Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working file m3u8 in chromecast #163

Open
su-su-nhh opened this issue Jul 14, 2023 · 10 comments
Open

Not working file m3u8 in chromecast #163

su-su-nhh opened this issue Jul 14, 2023 · 10 comments

Comments

@su-su-nhh
Copy link

I use file: https://kor.hanvid.com/file/045156a11886e576169f8721d9a61644/playlist.m3u8 to add chromecast but it doesn't work with this file

@kontrollanten
Copy link
Contributor

It should be solved when #118 is released.

@nickopris
Copy link

nickopris commented Nov 22, 2023

This is supposed to be fixed with the merging of 118 but I could not make it work.

I have a test page here:
https://couchtofitness.com/session/407 which does not work as expected. The Chromecast player attempts to load the source for a few seconds then gives up and displays the Chromecast icon. The browser is still connected to Chromecast.

We are loading the plugin from //cdn.jsdelivr.net/npm/@silvermine/[email protected]/dist/silvermine-videojs-chromecast.min.js

The video file link is: https://player.vimeo.com/external/887203408.m3u8?s=e209ffa7f9b282b57843370fc91a55f8b56b14ae

@kontrollanten
Copy link
Contributor

It seems that you haven't configured the modifyLoadRequestFn. It should be configured like this:

options = {
   techOrder: [ 'chromecast', 'html5' ], // Required
   chromecast: {
      modifyLoadRequestFn: function (loadRequest) { // HLS support
         loadRequest.media.hlsSegmentFormat = 'fmp4';
         loadRequest.media.hlsVideoSegmentFormat = 'fmp4';
         return loadRequest;
      }
   },
   plugins: {
      chromecast: {
      },
   }
};

@kontrollanten
Copy link
Contributor

Did it solve your issue?

@nickopris
Copy link

I had a version which was casting but the cast button was not showing up in the player. Now I fixed that but it's not casting. I have the same test link https://couchtofitness.com/session/407

I see a blank screen on Chromecast. I'd like to know how to debug this.

@dmitriy-baltak
Copy link

Had same issue but probably because of a different problem, hls is packaged not only in .fmp4 but also in .ts and in our case we use ts only, it's probably worth mentioning in the docs this fact, or even think of a more flexible solution that would allow player to support both

@nickopris
Copy link

nickopris commented Nov 27, 2023

@kontrollanten I still can't get it to work. Can someone post a demo page? I made a simple one here which doesn't work: https://onedesign.ro/videojs/vimeo.html

I just tested my stream url with another player and it seems to be working perfectly with chromecast https://bitmovin.com/demos/stream-test?format=hls&manifest=https%3A%2F%2Fplayer.vimeo.com%2Fexternal%2F887203408.m3u8%3Fs%3De209ffa7f9b282b57843370fc91a55f8b56b14ae

Update: I grabbed the source code and built it locally. I get the same result so I am starting to think that there is something wrong with the way I initialise the player or the stream is different than expected. Here is the test page with the locally built source code: https://onedesign.ro/videojs/locally-built/

@nickopris
Copy link

More information from my testing:
The link above that was not working is now working: https://couchtofitness.com/session/407
I added a new test link which does not work: https://couchtofitness.com/session/408

They are using the same code, I replaced fmp4 with ts in modifyLoadRequestFn

I struggle to debug the differences between these two feeds. I work with the assumptions that the codec used by Vimeo is the same for both links. The one I can't cast works fine with the Vimeo player so it's definitely possible to fix.

@nickopris
Copy link

I managed to get a working version by downloading the 4k version of the video file from Vimeo and re-uploading it. The only thing that I saw different was that the non-working hls url did not have the SUBTITLES entry. After re-uploading the auto-generated captions option was enabled on the Vimeo video settings page and it seems to cast fine.

This bit was in the working feed:
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="English (auto-generated)",LANGUAGE="en-x-autogen",URI="https://165vod-adaptive.akamaized.net/exp=1702418400~acl=%2Fe39db795-dd34-4da0-8102-171719e15f24%2F%2A~hmac=90bf07f1c1fab7b4a84b7915063557bf516663b715d72b2eddedfba4b5190282/e39db795-dd34-4da0-8102-171719e15f24/subtitles/119986868/playlist.m3u8?d=41.474767&f=dash&subtoken=5c0019d5d8f74f8e59fd72e3ec0681ecb219d69567543bcb880eb9974ba5ef23",CHARACTERISTICS="public.accessibility.transcribes-spoken-dialog",AUTOSELECT=YES,DEFAULT=NO

@kontrollanten
Copy link
Contributor

@nickopris Sorry for late answer. Can you try the demo at #166

Do you remember to run player.chromecast() after videojs initilazation?

   videojs('video_1', videojsOptions, function() {
      this.chromecast();
      loadVideo(videos[videoSelector.value]);
   });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants