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

Bug: On-Demand video treated as live on Safari with Media Chrome #915

Open
1 task done
jakubslambor opened this issue May 2, 2024 · 2 comments
Open
1 task done
Labels
bug Something isn't working Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug

Comments

@jakubslambor
Copy link

jakubslambor commented May 2, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Which Mux Elements/Packages does this apply to? Select all that apply

mux-video

Which browsers are you using?

Safari

Which operating systems are you using?

macOS

Description

When using <mux-video> in conjunction with Media Chrome, since version v0.16.5, when you try to play a HLS (.m3u8) video in macOS/iOS Safari, it treats it as mediastreamtype="live" on the Media Chrome <media-controller>. This causes the video to start from the beginning on every play/pause, and other weird behavior:

CleanShot.2024-05-02.at.18.52.02.mp4

CleanShot 2024-05-02 at 18 52 51@2x

versions <0.16.5 (0.16.4) and non-hsl streams work fine

https://www.media-chrome.org/docs/en/stream-type

Reduced test case

https://codesandbox.io/p/devbox/media-stream-type-qmjqmn?file=%2Fsrc%2FApp.vue

Steps to reproduce

reproduction sandbox is provided; remember to use Safari where this issue is present

Current Behavior

<media-controller> is mediastreamtype="live", which is incorrect

Expected Behavior

<media-controller> is mediastreamtype="on-demand"

Errors

No response

What version of the package are you using?

^0.16.5

@jakubslambor jakubslambor added bug Something isn't working Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug labels May 2, 2024
@dylanjha
Copy link
Contributor

dylanjha commented May 6, 2024

Thanks @jakubslambor for the code sandbox, that's very helpful.

I noticed with <mux-video> you're using the src="https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8" ...

Although that should work, the API for using <mux-video> is with videos hosted by Mux Video, and you initialize it with playback-id for example <mux-video playback-id="fujsyrk0014ec2lpnm11bzc2maysaqpqa"></mux-video>. Setting arbitrary src= is not something we test or guarantee support for with <mux-video>.

(Incidentally, the URL you used is hosted by mux.dev, but that's a test stream that we happen to host for Hls.js demo purposes, and it isn't hosted by our "normal" Mux Video hosting product.)

This is still probably a bug that we should look into, but to get unblocked I think you have 2 options here:

  1. If your video is a Mux Asset, use <mux-video playback-id="{PLAYBACK_ID}">
  2. If your video is not a Mux Asset use <video> or use <hls-video>: https://github.com/muxinc/hls-video-element

Would either of those be possible for you to try?

@jakubslambor
Copy link
Author

jakubslambor commented May 6, 2024

@dylanjha Oh cool, I didn't know about hls-video-element, I'll give that a shot! Thanks 🙏

Keeping open (This is still probably a bug that we should look into), proceed at your discretion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug
Projects
None yet
Development

No branches or pull requests

2 participants