-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix iOS HLS issues (probably) #835
Conversation
@@ -174,7 +163,7 @@ function createVideoTexture(url, contentType) { | |||
videoEl.onerror = reject; | |||
} | |||
|
|||
videoEl.addEventListener("loadedmetadata", () => resolve(texture), { once: true }); | |||
videoEl.addEventListener("canplay", () => resolve(texture), { once: true }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Video size was not set yet when the loadedmetadata
event fired for HLS videos. This is probably a more "correct" event for us to wait on for everything anyway
@@ -156,16 +155,6 @@ function createVideoTexture(url, contentType) { | |||
} else if (videoEl.canPlayType(contentType)) { | |||
videoEl.src = url; | |||
videoEl.onerror = reject; | |||
|
|||
// HACK aframe iOS HLS video hacks | |||
if (isIOS) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like these hacks only break things, and things seem fine without them or any sort of special shader. Chalk it up to iOS updates?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
down with the HACK
@@ -499,13 +493,12 @@ AFRAME.registerComponent("media-video", { | |||
if (texture.hls.currentLevel >= 0) { | |||
updateLiveState(); | |||
} | |||
} else { | |||
this.videoIsLive = this.video.duration === Infinity; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No clue if this is actually going to work, but I can't get a streaming source to work locally to try it out.
Fix video aspect ratio being broken, fix video being flipped, and an attempted fix for detecting live/VOD state (though I was not able to test this locally).