-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Augment userAgent detection #470
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
003d017
Augment userAgent detection
gkatsev 0628c30
update android version. Add vjs.IS_OLD_ANDROID. update canPlayType fix
gkatsev 0d39a0c
Merge branch 'master' into fix/userAgentDetection
gkatsev a1ce91f
Remove major and minor versions from vjs object since there isn't a c…
gkatsev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is the only one that worries me, because we currently use the webkit check to make sure we only override the canPlayType function in the default android browser. Changing this would match Firefox too. We just need a solution that takes that into consideration.
https://github.com/videojs/video.js/blob/master/src/js/media/html5.js#L231
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.
That if statement also checks the version of android. Firefox does not report the version of android; only Chrome for Android and the Native Android browser do. So, we could add a check there to make sure the version isn't null, since
null < 3
istrue
.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.
By the way, why are we check if the version is less than 3 if it is only broken on 2.2 and lower?
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.
I'm assuming it's still broken in 2.3 and fixed in 3.
On May 6, 2013, at 3:59 PM, Gary Katsevman [email protected] wrote:
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.
OK, just the comment and code are in disagreement. I can do a quick check and see anyway.
Do you think that checking for
null
there is a good compromise?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.
Ah, it does say 2.2. Definitely worth checking then.
Checking for null how?
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.
in media/html5.js, do a null check before checking the version, since firefox doesn't report report android version.
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.
Oh that's interesting. I didn't realize Firefox didn't report Android version. Is that true for other browsers like opera mobile too?
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.
According to http://www.useragentstring.com/pages/Opera Mobile/, some versions do report the android version and some don't. I'll do a quick check on that as well.
Checking for webkit in the long run, isn't a good idea, since chrome is moving to Blink at some point. We might want to have a separate check for webkit or something else for older androids.