Skip to content

Support online video services as well #12

Open
@choldgraf

Description

@choldgraf

In many cases, video content might be hosted online in a service instead of locally.
For example, many people upload videos to Google Drive or YouTube, and then want to embed their videos in documentation.

I think that it'd be in-scope for this extension to support these use-cases as well, for a limited subset of common video services. Probably somewhere around here:

class Video(Directive):

Implementing the logic to support a service would be too much work. For example, you could just add an extra check for whether the argument to .. video:: starts with http, and if so, try to detect the service (e.g., "youtube.com" self.arguments[0] or self.options.get("kind") == "youtube"). Then you could output an HTML raw:: block that included the proper structure for that video type.

If you want to see one example of directive logic like this, see:

https://github.com/2i2c-org/sphinx-2i2c-theme/blob/update-theme/src/sphinx_2i2c_theme/video.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions