0 votes
by (120 points)
The html seems to work as there is a space for the video indicating width and height is being read but no other element. I have tested the video in the browser and I have been able to embed from YouTube, etc.

2 Answers

0 votes
by (63.1k points)
Can you please tell us what story format you're using and post the code you tried and a link to the wiki article you are referencing? You can just edit this information into your question.

Without that information, we're forced to sit here and guess at the problem, which will probably wind up being quite a waste of time.
0 votes
by (159k points)

You need to use the question tags to indicate the name and full version number of the story format you are using, as this can effect answers. I will assume you are using the default story format of Twine 2 which is Harlowe v1.2.4

When quoting existing examples it helps if you supply either a copy of that example or a link to that example, this helps those answering your question know exactly what example you mean. I will assume you are quoting the example found on the video Add an Image, Movie, Sound Effect, or Music Twine 2 wiki page.

I will also assume you are using the install-able release of Twine 2.

1. That wiki example is about to embedding a video file within a page, and unfortunately YouTube uses streaming technologies to supply the video content which means you need to use YouTube's video player (or a similar player) to play their videos.

You can use YouTube's SHARE > EMBED options (found just below a video's page) to obtain the HTML needed to display one of it's videos in your page. eg. The HTML obtained from this TEST VIDEO looks like the following.

<iframe width="560" height="315" src="https://www.youtube.com/embed/C0DPdy98e4c" frameborder="0" allowfullscreen></iframe>

... and the above can be pasted within a Passage will show the video.

In the case of displaying an actual video file (like those found here) the equivalent of the wiki's example would be.

<video src="http://techslides.com/demos/sample-videos/small.webm" controls></video>

... I added the controls option so that the Reader can choose when to start the playing of the video.

The HTML5 equivalent of the above would look something like the follow.

<video controls> 
  <source src="http://techslides.com/demos/sample-videos/small.webm" type="video/webm"> 
  <source src="http://techslides.com/demos/sample-videos/small.ogv" type="video/ogg"> 
  <source src="http://techslides.com/demos/sample-videos/small.mp4" type="video/mp4">
  <source src="http://techslides.com/demos/sample-videos/small.3gp" type="video/3gp">
</video>

 ... which allows the Reader's web-browser to select which video file format it wants to play from the list of supplied, as not all video file formats are supported by all web-browser.

2. Due to current limitations of the install-able release of the Twine 2 application neither of the above video element based examples will actually display when using either the Test or the Play options, although the YouTube iframe element based example will.
note: All three of the above examples will work in both: the story HTML file created via the Publish to File option of any release of the application; as well as the Test and Play options of both web-browser based releases of the Twine 2 application.

...