d901813b6d2cc9060438378a992f37cf2b3f88a5
[playVideoOnDreambox.git] / development.rst
1 *****************
2 Development hints
3 *****************
4
5 Commands
6 ========
7 ``firefox -P dev``
8   Start firefox development profile
9 ``../node_modules/.bin/jpm watchpost --post-url http://localhost:8888/``
10   Automatically re-build ``.xpi`` file and install it in Firefox
11 ``../node_modules/.bin/jpm xpi``
12   Build a new version. Update ``package.json`` before.
13
14
15 URL fetching
16 ============
17 Fetch video URL::
18
19   $ youtube-dl --get-url https://www.youtube.com/watch?v=BRnPidrKto4
20
21
22 Dreambox
23 ========
24 API docs: http://dream.reichholf.net/e2web/#mediaplayercurrent
25
26 Play video::
27
28   http://192.168.3.42/web/mediaplayerplay?file=4097:0:1:0:0:0:0:0:0:0:http%253a%2F%2Fcweiske.de%2Ftagebuch%2Fimages%2Fkdenlive%2Fkdenlive-lower-third.webm
29
30 With the URL, the ``:`` of the ``http://`` is double encoded.
31
32 Stop current video and end dreambox mediaplayer::
33
34  $ curl 'http://192.168.3.42/web/mediaplayercmd?command=exit'
35
36
37
38 URLs
39 ====
40 - https://developer.mozilla.org/en-US/Add-ons/SDK/Tools/jpm#Developing_without_browser_restarts
41 - https://developer.mozilla.org/en-US/Add-ons/SDK/Tools/console#Logging_Levels
42 - https://developer.mozilla.org/en-US/Add-ons/SDK/Low-Level_APIs/system_child_process
43 - https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/Adding_a_Button_to_the_Toolbar
44 - https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/simple-prefs
45 - https://blog.mozilla.org/addons/2014/06/05/how-to-develop-firefox-extension/