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

Fix iOS HLS issues (probably) #835

Merged
merged 1 commit into from
Jan 12, 2019
Merged

Fix iOS HLS issues (probably) #835

merged 1 commit into from
Jan 12, 2019

Conversation

netpro2k
Copy link
Contributor

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).

@@ -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 });
Copy link
Contributor Author

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) {
Copy link
Contributor Author

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?

Copy link
Contributor

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;
Copy link
Contributor Author

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.

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

Successfully merging this pull request may close these issues.

2 participants