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

Flash crashes when going into fullscreen #2205

Closed
heff opened this issue May 28, 2015 · 17 comments · Fixed by #2217
Closed

Flash crashes when going into fullscreen #2205

heff opened this issue May 28, 2015 · 17 comments · Fixed by #2217
Milestone

Comments

@heff
Copy link
Member

heff commented May 28, 2015

In the 5.0 changes, something has broken Flash fullscreen. Noting it for the 5.0 milestone. If anyone has any clues let me know.

@heff heff added this to the v5.0.0 milestone May 28, 2015
@psharmz
Copy link

psharmz commented May 28, 2015

@heff is this on a particular browser? I tried it on desktop chrome and safari on ipad and didn't run into any fullscreen issues.

@mmcc
Copy link
Member

mmcc commented May 28, 2015

@psharmz It seems to be very much Flash-specific, so it has to be in a browser that needs Flash (or forced).

@heff
Copy link
Member Author

heff commented May 28, 2015

If you add data-setup='{ "techOrder": ["flash"] }' to your player it will force flash.

@heff
Copy link
Member Author

heff commented May 29, 2015

@dmlap @gkatsev, do you guys have a good way of seeing errors in the swf when they happen? The swf crashes when I go to fullscreen, but I have no insight into any internal errors...

@dmlap
Copy link
Member

dmlap commented May 29, 2015

First, I'd suggest swapping to the debug Flash player. Often, it will alert with a stack trace where the regular player just crashes. If that doesn't work, you could try to enable debug logging but it's a huge pain and rarely useful IMO.

My typical strategy is to start logging copiously through ExternalInterface and binary-search-via-comment until I can track down the offending lines. A bit barbaric but it's easy to do and works.

@bdeitte
Copy link
Contributor

bdeitte commented May 29, 2015

I also would suggest trying in Chrome and not-Chrome, because the Chrome-specific changes have been known to cause weirdness in the past. And different Flash player versions if you can, because that can also help narrow down an issue in release notes. Although David's suggestions are likely faster than going this route, and I don't know what Flash version switcher tools work anymore.

@psharmz
Copy link

psharmz commented May 29, 2015

@heff @mmcc ...I had set up up incorrectly but I see the fullscreen issue now. Forcing flash causes the player to crash in chrome and safari, but ff handles fullscreen fine.

@heff
Copy link
Member Author

heff commented May 29, 2015

Thanks guys. I installed the debug player, but not seeing any new info. Is there anything special I need to do to turn on the messages?

@bdeitte as @psharmz mentioned, it appears to be all browsers. I've logged out all the API calls from JavaScript to external interface, and nothing is too strange there. It seems to only happen on resize of the flash object when going to fullscreen, but I can't think of anything that would have changed around that.

@mister-ben
Copy link
Contributor

Works for me on Firefox, but I do see a problem on Chrome. Getting the Flash debugger working in Chrome is a PITA.

  • Install the PPAPI debugger from https://www.adobe.com/support/flashplayer/downloads.html
  • Close Chrome
  • Edit /Library/Internet Plug-Ins/PepperFlashPlayer/manifest.json
    • Change "x-ppapi-arch": "mac" to "x-ppapi-arch": "x64".
  • Set up logging. These are different locations to what's documented for the NPAPI plugin.
    • mkdir ~/Library/Application\ Support/Google/Chrome/Default/Pepper\ Data/Shockwave\ Flash/System
    • echo 'ErrorReportingEnable=1' > ~/Library/Application\ Support/Google/Chrome/Default/Pepper\ Data/Shockwave\ Flash/System/mm.cfg
    • echo 'TraceOutputFileEnable=1' >> ~/Library/Application\ Support/Google/Chrome/Default/Pepper\ Data/Shockwave\ Flash/System/mm.cfg
  • tail -f ~/Library/Application\ Support/Google/Chrome/Default/Pepper\ Data/Shockwave\ Flash/WritableRoot/Logs/flashlog.txt
  • Chrome will only use it's bundled plugin by default. Launch with --disable-bundled-ppapi-flash
  • /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-bundled-ppapi-flash

With that set up and working - a warning is logged when ExternalInterface is used - I get no errors logged on going to fullscreen. It looks to me as if Flash isn't actually crashing, but I do see these errors in the browser console:

VIDEOJS: Video.js: currentTime unavailable on Flash playback technology element. TypeError: this.el_.vjs_getProperty is not a function
    at Flash.98._api.(anonymous function) [as seeking] (http://localhost:8888/video.js/build/temp/video.js:9933:21)
    at Flash.currentTime (http://localhost:8888/video.js/build/temp/video.js:9879:14)
    at Player.techGet (http://localhost:8888/video.js/build/temp/video.js:7741:33)
    at Player.currentTime (http://localhost:8888/video.js/build/temp/video.js:7854:43)
    at SeekBar.getPercent (http://localhost:8888/video.js/build/temp/video.js:4348:32)
    at SeekBar.update (http://localhost:8888/video.js/build/temp/video.js:9480:25)
    at Player.ret (http://localhost:8888/video.js/build/temp/video.js:13399:15)
    at HTMLDivElement.ret (http://localhost:8888/video.js/build/temp/video.js:13399:15)
    at HTMLDivElement.111.data.dispatcher (http://localhost:8888/video.js/build/temp/video.js:13098:29)
    at Object.trigger (http://localhost:8888/video.js/build/temp/video.js:13183:25)
flash.js:198 Uncaught TypeError: this.el_.vjs_getProperty is not a function

@dmlap
Copy link
Member

dmlap commented May 29, 2015

@mister-ben TypeErrors like that one (anything like el_.vjs_blahBlah is not a property) are good indicators that the SWF has been unloaded (probably crashed).

@heff
Copy link
Member Author

heff commented May 29, 2015

Thanks for digging into that Ben. Like @dmlap said, the vjs_ error from javascript is why I was thinking the swf crashed. Also the onReady listener is fired again, telling me that the swf reloaded itself. I've tested the swf v4.5.4, and it has the same issue, so I think it's something we changed in javascript, but nothing calls the swf API when you just click fullscreen.

I wonder if it has something to do with removing the placeholder element. We used to embed a placeholder div and then replace that with the swf object. Now we just embed the swf object directly. Though I can't think of why that would have any impact.

@eXon any ideas what might be happening here?

@dmlap
Copy link
Member

dmlap commented May 29, 2015

One interesting thing I ran into recently that may be relevant: Chrome and Firefox reload SWFs when they are toggled between to display: block and none.

@mister-ben
Copy link
Contributor

Right, it's as if the browser is intentionally unloading and reloading the swf as it would if you apply then remove display:none.

@heff
Copy link
Member Author

heff commented May 29, 2015

Figured it out... Current:

.video-js { display: inline-block; }

Fix:

.video-js { display: block; }

fight club - edward norton punching himself in the face

@dmlap
Copy link
Member

dmlap commented May 29, 2015

We should have just used <table> as the player parent element

@heff
Copy link
Member Author

heff commented May 29, 2015

dude, srsly

@hartman
Copy link
Contributor

hartman commented Nov 30, 2015

Hmm, this isn't really a nice change. Changing the display element of an object will also cause reflows of the page, which is a serious performance penalty if it happens. Couldn't this have been made specific to just Flash ?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants