vishal733

Setting up Webchimera based player

May 6th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.12 KB | None | 0 0
  1. ===================
  2. Setup (both Win 10/Mac High Sierra)
  3. ===================
  4.  
  5. (1)
  6. Install VLC 3.0.2 on system (.dmg/.exe as applicable)
  7.  
  8. ===============================================================
  9.  
  10. (2.0)
  11. cd <working_dir>
  12. git clone https://github.com/RSATom/WebChimera.js.git    # master branch, commit b49a144)
  13. cd WebChimera.js
  14.  
  15. (2.1)
  16. Edit contents of build_electron.sh, as below:
  17.  
  18. export npm_config_wcjs_runtime="electron"
  19. export npm_config_wcjs_runtime_version="1.7.13"
  20. export npm_config_wcjs_arch="x64"
  21. npm install
  22.  
  23. (2.2)
  24. The compiled VLC library is located at build/Release/WebChimera.js.node
  25.  
  26. ===============================================================
  27.  
  28.  
  29. (3.0)
  30. git clone https://github.com/aiyobi/node-vlcPlayer-demo.git
  31. cd node-vlcPlayer-demo
  32.  
  33. (3.1)
  34. Set environment variables as under:
  35.  
  36. <WIN>
  37. set WCJS_RUNTIME=electron
  38. set WCJS_RUNTIME_VERSION=v1.4.13
  39. set WCJS_VERSION=v0.2.7
  40. set WCJS_ARCH=x64
  41.  
  42.  
  43. <MAC>
  44. export WCJS_RUNTIME="electron"
  45. export WCJS_RUNTIME_VERSION="v1.4.13"
  46. export WCJS_VERSION="v0.2.7"
  47. export WCJS_ARCH="x64"
  48.  
  49. (3.2)
  50. npm install
  51.  
  52. (3.3)
  53. Copy WebChimera.js.node from
  54. WebChimera.js/build/Release/WebChimera.js.node
  55. to
  56. node-vlcPlayer-demo/node_modules/wcjs-prebuilt/bin/
  57.  
  58.  
  59. ==========================================================
  60.  
  61. (4) Update VLC libraries
  62. This step is different for Win and Mac.
  63.  
  64. On Win, I copy libraries from VLC installation direction to
  65. node-vlcPlayer-demo/node_modules/wcjs-prebuilt/bin/lib, and got it working
  66.  
  67. On Mac, VLC 3.0.2 uses @rpath in the libs. I realized I do not need to copy anything to local lib directory as in case of Windows. It was already using the system VLC libraries
  68.  
  69.  
  70. ==========================================================
  71.  
  72. (5) Execute
  73.  
  74. <Win>
  75. ./node_modules/<path_to_electron> app.js
  76. [WORKS]
  77.  
  78. <Mac>
  79. ./node_modules/electron/dist/Electron.app/Contents/MacOS/Electron app.js
  80. [Throws an error]
  81.  
  82. Error as under:
  83. '
  84. Uncaught TypeError: Cannot set property 'setting' of undefined
  85.    at wjs.addPlaylist (/Volumes/dataDrive/work/yobi/web/build_2.0.0-vlc_3.0.2/node-vlcPlayer-demo/node_modules/wcjs-player/index.js:633)
  86. '
Add Comment
Please, Sign In to add comment