videojs / video-js-swf

Custom Flash Player for VideoJS
http://videojs.com
Other
336 stars 312 forks source link

RTMP can play in electron's development mode but cannot play in product mode #243

Closed HPDell closed 5 years ago

HPDell commented 5 years ago

Package versions are:

This is development mode:

image

This is production mode:

image

In production mode, console doesn't print any error log. So I cannot find what is wrong.

gkatsev commented 5 years ago

Are you specifying the pepper-flash plugin as outlined in electron's docs? I wonder if that's the difference between development and production modes.

HPDell commented 5 years ago

Yes. I did this. But it doesn't work. The author of nw-flash-trust said do not use this library with electrom. 😭

I sovled this issus by loading my content pages from a http server. Because in development mode, the content of electron app is loaded from a dev server, but it is loaded from disk via file:// protocol. I think this is the reason why video-js-swf doesn't work. So I put my contents on a server and fetch the with nginx.

I still want to seek a solution with out this http server. The document "using peper-flash pulgin in electron" is not detail enough.

Do you have some good solutions?

gkatsev commented 5 years ago

flash generally doesn't like being loaded over file://, a local webserver is definitely your best bet here.

HPDell commented 5 years ago

Thanks. But if I use electron in production mode, it's troublesome to upload the content pages to a server. I don't know how to load pages from electron's static resource via its own webserver in production mode. I tried to put the content pages in static directory but it didn't work.

gkatsev commented 5 years ago

Unfortunately, we don't really know much about how electron and flash work, you'll probably be better off asking on Stack Overflow or if electron has a help channel (like slack or gitter).

HPDell commented 5 years ago

OK. I will. Thank you very much.