jaruba/wcjs-player

Nothing happens on Electron

willnew opened this issue · 12 comments

Hi,

I'm using wcjs-player together with wcjs-prebuit in my app which is running on Electron 1.3.0 on MAC, I downloaded wcjs-prebuit which contains built-in VLC:

WebChimera.js_v0.2.6_electron_v1.3.0_VLC_v2.2.4_x64_osx.tar.gz

and npm installed the latest wcjs-player(6.0.1), followed the example code.

After that, when I opened my app, I can only see a black screen with Buffering 0% displayed, and there's no error message in console. I added some debug code into wcjs-player/index.js to get some useful information, and these are what I got:

this.vlc.playlist.items => a VlcPlaylistItems object with only one attribute { count: 1 }
this.vlc.playlist.itemCount => 1
this.vlc.playlist.currentItem => 0

Do you have any comments on this?

this is the playlist I got after json convert:
[{
url: "http://archive.org/download/CartoonClassics/Krazy_Kat_-_Keeping_Up_With_Krazy.mp4"
}]

And there're the logs I got from added eventListener

media item has changed
index.html:29 current state: opening
index.html:35 opening a video
index.html:29 current state: buffering
index.html:30 buffering 0%

I just tried this app https://github.com/jaruba/node-vlcPlayer-demo
with configurations:

export WCJS_RUNTIME="electron"
export WCJS_RUNTIME_VERSION="v1.3.0"
export WCJS_VERSION="v0.2.6"
export WCJS_ARCH="x64"

and update some code in app.js to make electron 1.3.0 successfully start, the behaviour is quite same as what I ran in my APP, I hope this information can help

Could you please try run the https://github.com/RSATom/wcjs-ugly-demo? Maybe it's really some new issue on Mac OS X...

@RSATom thanks for your reply, I'll take a look at it

without luck, I run this demo on

WebChimera.js_v0.2.6_electron_v1.3.0_VLC_v2.2.4_x64_osx.tar.gz

and get folowing errors:

Uncaught Error: Could not locate the bindings file. Tried:
→ /Users/will/Documents/wcjs-ugly-demo/node_modules/webchimera.js/build/WebChimera.js.node
→ /Users/will/Documents/wcjs-ugly-demo/node_modules/webchimera.js/build/Debug/WebChimera.js.node
→ /Users/will/Documents/wcjs-ugly-demo/node_modules/webchimera.js/build/Release/WebChimera.js.node
→ /Users/will/Documents/wcjs-ugly-demo/node_modules/webchimera.js/out/Debug/WebChimera.js.node
→ /Users/will/Documents/wcjs-ugly-demo/node_modules/webchimera.js/Debug/WebChimera.js.node
→ /Users/will/Documents/wcjs-ugly-demo/node_modules/webchimera.js/out/Release/WebChimera.js.node
→ /Users/will/Documents/wcjs-ugly-demo/node_modules/webchimera.js/Release/WebChimera.js.node
→ /Users/will/Documents/wcjs-ugly-demo/node_modules/webchimera.js/build/default/WebChimera.js.node
→ /Users/will/Documents/wcjs-ugly-demo/node_modules/webchimera.js/compiled/6.3.0/darwin/x64/WebChimera.js.node

Is it because I used electron 1.3.0 or something

@willnew, for me it looks like you've extracted .tar.gz to wrong folder. Since prebuilt don't use bindings

actually I copy the wcjs-prebuit from the installed one on wcjs-player, and now I'm returning to node-vlcPlayer-demo with this version of prebuit:

WebChimera.js_v0.2.5_electron_v0.37.6_VLC_v2.2.3_x64_osx.tar.gz

and electron v0.37.6, Still nothing in app but Buffering 0%

@RSATom Update for https://github.com/RSATom/wcjs-ugly-demo: I downloaded the two tar.gz files I mentioned in this issue, and extract both of them into node_modules/, and I tried deferrent version of electron with ./node_modules/.bin/electron ./electron_main.js, this time, no error message in console, but the page is empty for both versions

actually I copy the wcjs-prebuit from the installed one on wcjs-player

no, you should exactly follow README from wcjs-ugly-demo. And it's better extract files from command line.

and avoid copy files with Finder, since it could break symlinks.

Thanks for your suggestion, you can see from my last commit, I do download a version of file, extract by tar command, and move to node_moudules by cp command, but still nothing on the demo page, I changed the playlist url into file:///PATH_TO_MY_FILE.mp4 and tried again, this time the buffering was done and the total minutes of that mp4 file displayed as well, but the play not start and app crashes minutes after.

@RSATom I got some update with good news, I reinstalled wcjs-prebuit with this command:

WCJS_RUNTIME=electron WCJS_RUNTIME_VERSION=v0.37.8 WCJS_VERSION=v0.2.4 npm install wcjs-prebuilt

instead of reading config from package.json and now all the local files & remote resources can be played as expected, Thanks for your time, and have a good day :)