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: safari hls #48

Merged
merged 3 commits into from
Jan 31, 2018
Merged

fix: safari hls #48

merged 3 commits into from
Jan 31, 2018

Conversation

brandonocasey
Copy link
Contributor

No description provided.


// import controls so they get regisetered with videojs
import './cardboard-button';
import './big-vr-play-button';

const validProjections = [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved to utils

@@ -46,51 +33,6 @@ const errors = {
}
};

const getInternalProjectionName = function(projection) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved to utils

if (videojs.browser.IE_VERSION) {
// IE 11 does not support enough webgl to be supported
// older safari does not support cors, so it wont work
if (videojs.browser.IE_VERSION || !utils.corsSupport) {
Copy link
Contributor Author

@brandonocasey brandonocasey Jan 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

older version of safari that don't support cors at all (<9 wont work), they dont work right now.

this.videoTexture.format = THREE.RGBFormat;
}
// https://bugs.webkit.org/show_bug.cgi?id=179417
if (videojs.browser.IS_ANY_SAFARI && utils.isHLS(this.player_.currentSource().type)) {
Copy link
Contributor Author

@brandonocasey brandonocasey Jan 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previously we had a hack to get video textures working here. This uses a canvas image texture that is updated to the current video frame instead. This makes safari 10 and 11 both work for all versions but it can be a bit slower on worse hardware, and it probably doesn't look as good.

Copy link
Contributor Author

@brandonocasey brandonocasey Jan 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my testing on an iPAD It preforms well enough that I think its a solution.

@pagarwal123
Copy link

QA LGTM

@brandonocasey brandonocasey merged commit 939f242 into master Jan 31, 2018
@brandonocasey brandonocasey deleted the fix/safari-hls branch January 31, 2018 23:09
brandonocasey added a commit that referenced this pull request Jan 31, 2018
* use "software rendering" to fix safari hls
* add an error for hls cors issues
* fix animation frame looping
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.

None yet

3 participants