Open mscheltienne opened 7 months ago
Thanks for the offer. These are the things you need to do to add a new platform:
youtube.py
, vimeo.py
and peertube.py
. This will contain subclasses of utils.video
and utils.Video
which set whichever parameters are different for your platform from the default.__init__.py
.README.md
and the RST files in the docs
folder. Again, follow the pattern for other platforms.Twitch requires the parent domain.. I am actually unable to include a .. raw::
directives which works locally through file:///
. Example directive which works:
.. raw:: html
<div style="text-align: center;">
<iframe
src="https://player.twitch.tv/?video=1950152310&parent=mscheltienne.github.io&parent=well-play-teen.org&autoplay=false"
allowfullscreen
frameborder="0"
height="378"
scrolling="no"
width="620">
</iframe>
</div>
I don't see an easy way to get the parent
as part of this extension.. any idea?
I think you do the following.
Video
, overwrite option_spec
with one that adds a parent
option. utils.visit_video_node_html
which adds the right string based on parent
into url_parameters
. If you look at youtube.py
then you can see such a wrapper.But we don't have a way to retrieve the domain (to complete the parent) dynamically. I guess the only option is a configuration key, e.g. 'twitch_parent'.
At the point that sphinx runs, it has no way of knowing where the resulting html will be hosted. I think that you're right that it needs to go in conf.py
, because it's global.
It should be possible to support twitch as well? If you can give me a couple of hints/guidance, I can open a PR to add the functionality.