Skip to content

refactor: remove IE8 specific changes#5041

Merged
gkatsev merged 43 commits into
masterfrom
remove-ie8
Mar 23, 2018
Merged

refactor: remove IE8 specific changes#5041
gkatsev merged 43 commits into
masterfrom
remove-ie8

Conversation

@gkatsev

@gkatsev gkatsev commented Mar 21, 2018

Copy link
Copy Markdown
Member

BREAKING CHANGE: remove IE8 specific JavaScript and CSS code. Remove Android 2.3 workaround.

TODO:

  • remove weird track workarounds for defineProperty
  • use defineProperties where appropriate
  • update vtt.js to remove weird workaround for defineProperty
  • update vtt.js to use defineProperties
  • remove IS_OLD_ANDROID canPlayType monkeypatching.
  • remove es3 preset
  • remove IE8 CSS hacks and workarounds.
  • remove videojs-ie8 dep
  • update sandbox files appropriately.
  • remove IE8 specific tests
  • remove IE8 checking in tests and just run them always.
  • fix broken tests
  • update videojs-fonts to remove ie8 stuff

@gkatsev

gkatsev commented Mar 21, 2018

Copy link
Copy Markdown
Member Author

The best part is that this change makes the min.gz file 0.16KB larger.

Comment thread .babelrc
"presets": [
"es3",
["es2015", {
"loose": true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

don't we only do loose for IE < 11 as well?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

we don't need loose mode but the filesize output from loose mode is smaller compared to regular.

Comment thread src/js/utils/browser.js
}
return null;
}());
export const IS_IE8 = (/MSIE\s8\.0/).test(USER_AGENT);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am not sure if we should remove this code

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yeah, maybe we should keep these, not sure.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Actually, I think I'm inclined to leave it out since we don't need any IE8 checks and we can always add it back in if necessary.

@brandonocasey

Copy link
Copy Markdown
Contributor

could also be good to mention in the title that this removes old android code as well.

@gkatsev

gkatsev commented Mar 21, 2018

Copy link
Copy Markdown
Member Author

I'll add the android thing as part of the BREAKING CHANGE flag in the commit message.

@gkatsev

gkatsev commented Mar 21, 2018

Copy link
Copy Markdown
Member Author

actually, I think the IE8 CSS stuff can come in a separate PR.

@gkatsev

gkatsev commented Mar 21, 2018

Copy link
Copy Markdown
Member Author

same with the vttjs update.

@gkatsev

gkatsev commented Mar 21, 2018

Copy link
Copy Markdown
Member Author

well, did the css changes. font stuff and vttjs stuff can and should come in separate PRs

@gkatsev gkatsev changed the title WIP: Remove IE8 refactor: remove IE8 specific changes Mar 21, 2018
@brandonocasey

brandonocasey commented Mar 22, 2018

Copy link
Copy Markdown
Contributor

CSS still in the branch that references IE < 11. If these are still valid we should remove/change the comments
https://github.com/videojs/video.js/blob/master/src/css/components/_control-bar.scss#L47
https://github.com/videojs/video.js/blob/master/src/css/components/_control.scss#L33
https://github.com/videojs/video.js/blob/master/src/css/components/_layout.scss#L106
https://github.com/videojs/video.js/blob/master/src/css/components/_layout.scss#L152
https://github.com/videojs/video.js/blob/master/src/css/components/_poster.scss#L19
https://github.com/videojs/video.js/blob/master/src/css/components/_progress.scss#L66
https://github.com/videojs/video.js/blob/master/src/css/components/_progress.scss#L95
https://github.com/videojs/video.js/blob/master/src/css/components/_progress.scss#L97
https://github.com/videojs/video.js/blob/master/src/css/components/_time.scss#L21
https://github.com/videojs/video.js/blob/master/src/css/components/_text-track.scss#L22
https://github.com/videojs/video.js/blob/master/src/css/components/_volume.scss#L4
https://github.com/videojs/video.js/blob/master/src/css/components/menu/_menu.scss#L25
https://github.com/videojs/video.js/blob/master/src/css/components/menu/_menu.scss#L34
https://github.com/videojs/video.js/blob/master/src/css/components/_modal-dialog.scss#L9

Do we need the -ms-filter here?
https://github.com/videojs/video.js/blob/master/src/css/components/_volume.scss#L68

Seems like we should manually run autoprefixer over some of this code. Mostly for this pr I am worries about the -ms- vendor prefix
https://github.com/videojs/video.js/blob/master/src/css/_utilities.scss

@brandonocasey

Copy link
Copy Markdown
Contributor

Side note should we have an HTML5 video attribute list and types somewhere in the code?
https://github.com/videojs/video.js/blob/master/src/js/utils/dom.js#L394

JS code:
https://github.com/videojs/video.js/blob/master/src/js/player.js#L2887
https://github.com/videojs/video.js/blob/master/src/js/player.js#L582
https://github.com/videojs/video.js/blob/master/src/js/player.js#L627
https://github.com/videojs/video.js/blob/master/src/js/player.js#L3399
https://github.com/videojs/video.js/blob/master/src/js/tech/html5.js#L1868
https://github.com/videojs/video.js/blob/master/src/js/utils/dom.js#L70
https://github.com/videojs/video.js/blob/master/src/js/utils/dom.js#L329
https://github.com/videojs/video.js/blob/master/src/js/utils/dom.js#L394
https://github.com/videojs/video.js/blob/master/src/js/utils/dom.js#L490
https://github.com/videojs/video.js/blob/master/src/js/utils/dom.js#L786
https://github.com/videojs/video.js/blob/master/src/js/utils/events.js#L106
https://github.com/videojs/video.js/blob/master/src/js/utils/log.js#L27
https://github.com/videojs/video.js/blob/master/src/js/utils/url.js#L50
https://github.com/videojs/video.js/blob/master/src/js/utils/url.js#L66
https://github.com/videojs/video.js/blob/master/src/js/utils/url.js#L157
https://github.com/videojs/video.js/blob/master/src/js/utils/url.js#L161

Maybe no try catch here?
https://github.com/videojs/video.js/blob/master/src/js/tracks/text-track-display.js#L47

Im not sure if this comment applies anymore:
https://github.com/videojs/video.js/blob/master/src/js/utils/url.js#L105
https://github.com/videojs/video.js/blob/master/src/js/setup.js#L62

Seems like something that should have been solved in the Flash tech:
https://github.com/videojs/video.js/blob/master/src/js/player.js#L1084
https://github.com/videojs/video.js/blob/master/src/js/player.js#L1573

If this is still an issue in other browsers we should just change the comment:
https://github.com/videojs/video.js/blob/master/src/js/player.js#L2947
https://github.com/videojs/video.js/blob/master/src/js/poster-image.js#L59
https://github.com/videojs/video.js/blob/master/src/js/menu/menu.js#L54
https://github.com/videojs/video.js/blob/master/src/js/tech/html5.js#L911
https://github.com/videojs/video.js/blob/master/src/js/tech/html5.js#L954
https://github.com/videojs/video.js/blob/master/src/js/tech/html5.js#L978

I don't think the iife is needed anymore as try/catch can be optimized now
Also the comment may need to be changed?
https://github.com/videojs/video.js/blob/master/src/js/tech/html5.js#L1227
https://github.com/videojs/video.js/blob/master/src/js/tech/html5.js#L1255

@brandonocasey

Copy link
Copy Markdown
Contributor

I think we use them in a lot of places internally, and new techs it could be useful

@gkatsev

gkatsev commented Mar 22, 2018

Copy link
Copy Markdown
Member Author

A bit hesitant to make changes to URL.js. Not touching events.js, I think the try/catch in a few places should stay just to be extra safe, the "ie6" SO link for getAbsoluteURL still applies, since it still uses the same technique.

@gkatsev

gkatsev commented Mar 22, 2018

Copy link
Copy Markdown
Member Author

We have a few things here that related to IE and no media player, I'm inclined to leave the try/catches for them in. I'll update them to just mention IE in general, rather than IE9 or something.

@gkatsev

gkatsev commented Mar 22, 2018

Copy link
Copy Markdown
Member Author

also, the two flash related items might be considered in a separate PR/issue.

@brandonocasey

brandonocasey commented Mar 23, 2018

Copy link
Copy Markdown
Contributor

More stuff

Not sure if we came to a conclusion, or if the comment just needs to be changed:

In tests/docs if we want to do them in this pr

docs

tests

@gkatsev

gkatsev commented Mar 23, 2018

Copy link
Copy Markdown
Member Author

Some of what you linked was already fixed. Most of what I haven't changed is because it isn't worth changing at least not for the PR because it involves unnecessary refactoring.

@brandonocasey

Copy link
Copy Markdown
Contributor

ok well the code still lgtm, I added check marks to my previous comment, feel free to check off what's done and I will move everything else into a separate issue.

@gkatsev

gkatsev commented Mar 23, 2018

Copy link
Copy Markdown
Member Author

@gkatsev gkatsev merged commit bc2da7c into master Mar 23, 2018
@gkatsev gkatsev deleted the remove-ie8 branch March 23, 2018 17:25
@gkatsev gkatsev mentioned this pull request Apr 23, 2018
gkatsev added a commit that referenced this pull request May 22, 2018
When having a video-js embed with a class attribute, as part of the
changes to remove old IE support (#5041), we overwrote our addition of
the video-js class when it was missing. Instead, we want to make sure
that we don't override the class names again since they are already set
up correctly.

Fixes videojs/http-streaming#100
gkatsev added a commit that referenced this pull request May 23, 2018
When having a video-js embed with a class attribute, as part of the
changes to remove old IE support (#5041), we overwrote our addition of
the video-js class when it was missing. Instead, we want to make sure
that we don't override the class names again since they are already set
up correctly.

Fixes videojs/http-streaming#100
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.

3 participants