Reputation: 1147
I’m working on an Electron project where the main focus is to present video streams in RTMP format to the users.
I’ve been following some guides; atom/electron’s official guide; “Using Pepper Flash Plugin” as well as this example app’s slightly more detailed walkthrough, and I’ve gotten Flash working in Electron. I’ve been able to load various sites into my main BrowserWindow
and I’ve witnessed Pepper Flash playing movies in all its glory.
However, I’m banging my head against the wall trying to implement a self-hosted player within Electron. I’ve tried JWPlayer and video.js thus far, and all resources are loading nicely – for a brief moment.
JWPlayer
Flash player is visibly there, then it fails and displays an error message; “Flash plugin failed to load”.
video.js
Flash player is visibly there, but doesn’t react to anything – not pushing the play button, not calling player.play()
. Nothing.
Common
I’ve not seen so much as a glimpse of a frame from any of our available streams, be it live or vod ones.
I’ve tried massaging my stream URLs as described in both JWPlayer’s and video.js’ docs, but no cigar.
I’m fresh out of imagination, and in need a fresh – or experienced – pair of eyes on this.
Upvotes: 2
Views: 2823
Reputation: 1147
Jakub Szwacz explains it all in an understandable way, and also provides a solution. I fixed an issue in a new Electron project today, and just now realized it’s the same as this one – I just didn’t understand what was wrong the way funrob was trying to explain it.
Upvotes: 2
Reputation: 619
Sounds like the Flash plugin is being blocked. We display the “Flash plugin failed to load” error message when JavaScript does not receive an ExternalInterface call from ActionScript in jwplayer.flash.swf more than 4 seconds after it has been embedded. This can simply be a network issue if the swf cant load in time, but it's more likely another problem withe browser (electron) blocking execution of the Flash plugin or it's communication with JavaScript.
I'm not sure which version of Chrome/Pepper Flash ships with electron currently, but since October of 2015, execution of the plugin is throttled under certain circumstances. Here's a write up on this "Power Saving" feature: http://www.jwplayer.com/blog/chrome-power-saving/
Make sure the swf is not hosted cross-domain or on a different protocol than the page it's embedded in. Flash security sandbox violations will prevent Flash from being able to execute JS or load external media streams.
Upvotes: 1