Update README and development docs
[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 ``../jpm-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 Fetch all available URLs::
22
23   $ youtube-dl --quiet --dump-json https://www.youtube.com/watch?v=BRnPidrKto4
24
25
26 Dreambox
27 ========
28 API docs: http://dream.reichholf.net/e2web/#mediaplayercurrent
29
30 Play video::
31
32   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
33
34 With the URL, the ``:`` of the ``http://`` is double encoded.
35
36 Stop current video and end dreambox mediaplayer::
37
38  $ curl 'http://192.168.3.42/web/mediaplayercmd?command=exit'
39
40 Dreambox does not play HLS streams.
41
42
43 Debugging
44 =========
45 ``about:config``
46
47 ``extensions.sdk.console.logLevel``
48   ``debug``
49
50
51
52 Links
53 =====
54 - https://developer.mozilla.org/en-US/Add-ons/SDK/Tools/jpm#Developing_without_browser_restarts
55 - https://developer.mozilla.org/en-US/Add-ons/SDK/Tools/console#Logging_Levels
56 - https://developer.mozilla.org/en-US/Add-ons/SDK/Low-Level_APIs/system_child_process
57 - https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/Adding_a_Button_to_the_Toolbar
58 - https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/simple-prefs
59 - https://blog.mozilla.org/addons/2014/06/05/how-to-develop-firefox-extension/