Giter Club home page Giter Club logo

Comments (16)

Jeydin avatar Jeydin commented on September 16, 2024

Yeah I get this too, the screen just turns white

from miyou.

Jeydin avatar Jeydin commented on September 16, 2024

https://streamable.com/vigchx

from miyou.

debsishu avatar debsishu commented on September 16, 2024

https://streamable.com/vigchx

Mine works fine, can't seem to reproduce the issue. What browser are you using?

from miyou.

Jeydin avatar Jeydin commented on September 16, 2024

Safari
What browser and phone are you using?

from miyou.

debsishu avatar debsishu commented on September 16, 2024

Safari What browser and phone are you using?

I read about this. And the issue is with iOS devices, all iOS browsers are all build upon safari, and safari doesn't support HLS video streaming, that's why It errors out.

There are work arounds for that, but currently I don't have a iOS device, so can't test those.

from miyou.

Jeydin avatar Jeydin commented on September 16, 2024

Dang

from miyou.

Jeydin avatar Jeydin commented on September 16, 2024

I could test it for you

from miyou.

debsishu avatar debsishu commented on September 16, 2024

I could test it for you

well, without having a physical device in hand can't implement those. So for now I can't do anything๐Ÿ˜”.

you can try out this
https://stackoverflow.com/questions/43287226/hls-video-streaming-on-ios-safari#:~:text=else%20if%20(video.canPlayType(%27application/vnd.apple.mpegurl%27))%20%7B%0A%20%20%20%20video.src%20%3D%20%27https%3A//video%2Ddev.github.io/streams/x36xhzz/x36xhzz.m3u8%27%3B%0A%20%20%20%20video.addEventListener(%27loadedmetadata%27%2C%20function()%20%7B%0A%20%20%20%20%20%20video.play()%3B%0A%20%20%20%20%7D)%3B%0A%20%20%7D

from miyou.

Jeydin avatar Jeydin commented on September 16, 2024

D:

from miyou.

Jeydin avatar Jeydin commented on September 16, 2024

image
I changed the lines to the one I saw from the Stackoverflow, I think I did something but I don't think I'm quite there yet, this is what I see on the watch page now:
image

from miyou.

Jeydin avatar Jeydin commented on September 16, 2024

Oh but hey when I switch to external it works now
External is mid I need my delicious internal to work :3

from miyou.

Jeydin avatar Jeydin commented on September 16, 2024

Something weird and mind blowing happened when I switched back
I opened Attack on Titan
Internal video was blank, so I switched to external, which worked
When I switched back to internal, something weird happens...
https://streamable.com/s3cvam

from miyou.

Jeydin avatar Jeydin commented on September 16, 2024

How do I make the video fit where it's supposed to go?

from miyou.

debsishu avatar debsishu commented on September 16, 2024

How do I make the video fit where it's supposed to go?

I have used https://plyr.io/ for the video player, I think you have to set up that

from miyou.

debsishu avatar debsishu commented on September 16, 2024

I think you have to do something similar like this, not so sure

else if (video.canPlayType("application/vnd.apple.mpegurl")) {
      video.src = src;
      const defaultOptions = {
        captions: { active: true, update: true, language: "en" },
      };
      let player = new plyr(video, defaultOptions);
      setPlayer(new plyr(video, defaultOptions));
      player.on("enterfullscreen", (event) => {
        window.screen.orientation.lock("landscape");
      });

      player.on("exitfullscreen", (event) => {
        window.screen.orientation.lock("portrait");
      });

      player.on("timeupdate", function (e) {
        var time = player.currentTime,
          lastTime = localStorage.getItem(title);
        if (time > lastTime) {
          localStorage.setItem(title, Math.round(player.currentTime));
        }
        if (player.ended) {
          localStorage.removeItem(title);
        }
      });

      player.on("play", function (e) {
        if (flag) {
          var lastTime = localStorage.getItem(title);
          if (lastTime !== null && lastTime > player.currentTime) {
            player.forward(parseInt(lastTime));
          }
          flag = false;
        }
      });

      player.on("seeking", (event) => {
        localStorage.setItem(title, Math.round(player.currentTime));
      });
    } else {
      const player = new plyr(src, defaultOptions);
      player.source = {
        type: "video",
        title: "Example title",
        sources: [
          {
            src: src,
            type: "video/mp4",
          },
        ],
      };
    }

from miyou.

Tsuksi avatar Tsuksi commented on September 16, 2024

I think you have to do something similar like this, not so sure

else if (video.canPlayType("application/vnd.apple.mpegurl")) {
      video.src = src;
      const defaultOptions = {
        captions: { active: true, update: true, language: "en" },
      };
      let player = new plyr(video, defaultOptions);
      setPlayer(new plyr(video, defaultOptions));
      player.on("enterfullscreen", (event) => {
        window.screen.orientation.lock("landscape");
      });

      player.on("exitfullscreen", (event) => {
        window.screen.orientation.lock("portrait");
      });

      player.on("timeupdate", function (e) {
        var time = player.currentTime,
          lastTime = localStorage.getItem(title);
        if (time > lastTime) {
          localStorage.setItem(title, Math.round(player.currentTime));
        }
        if (player.ended) {
          localStorage.removeItem(title);
        }
      });

      player.on("play", function (e) {
        if (flag) {
          var lastTime = localStorage.getItem(title);
          if (lastTime !== null && lastTime > player.currentTime) {
            player.forward(parseInt(lastTime));
          }
          flag = false;
        }
      });

      player.on("seeking", (event) => {
        localStorage.setItem(title, Math.round(player.currentTime));
      });
    } else {
      const player = new plyr(src, defaultOptions);
      player.source = {
        type: "video",
        title: "Example title",
        sources: [
          {
            src: src,
            type: "video/mp4",
          },
        ],
      };
    }

Yea that works you should probably merge that thank you!

from miyou.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.