Disable autoplay in embedded videos
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 3
- Joined: Tue Aug 18, 2020 12:36 am
Disable autoplay in embedded videos
I'm trying to embed several mp4 videos in my DITA project, but when the HTML5 is generated, the videos all autoplay in both Chrome & IE/Edge. (This doesn't seem to occur in Firefox, FWIW.)
The code I'm using in my .dita topic file is:
Is there some other parameter I should be using that can disable autoplay on embedded video files?
The code I'm using in my .dita topic file is:
Code: Select all
<object outputclass="video" type="video/mp4" data="link-to-video-file-here.mp4" width="640" height="360">
<param name="autoplay" value="false" />
<param name="allowFullScreen" value="true" />
<param name="controls" value="yes"/>
</object>
-
- Posts: 9416
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Disable autoplay in embedded videos
Hi,
I cannot reproduce this problem on my side. Are you using Oxygen's bundled DITA OT or an external DITA OT distribution for publishing?
I published to HTML5 and used Chrome and Firefox to try this out.
If you look in the HTML output at the HTML page for your topic, how does the generated HTML structure for the DITA <video> look like?
Regards,
Radu
I cannot reproduce this problem on my side. Are you using Oxygen's bundled DITA OT or an external DITA OT distribution for publishing?
I published to HTML5 and used Chrome and Firefox to try this out.
If you look in the HTML output at the HTML page for your topic, how does the generated HTML structure for the DITA <video> look like?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 3
- Joined: Tue Aug 18, 2020 12:36 am
Re: Disable autoplay in embedded videos
We use an external build system to generate our DITA documentation - OxygenXML Editor is used for authoring & editing. The generated HTML page displays the video as:
Any ideas/suggestions would be much appreciated. Thanks!
Code: Select all
<object type="video/mp4" height="360" data="link-to-video-file-here.mp4" width="640">
<param name="autoplay" value="false" valuetype="data"></param>
<param name="allowFullScreen" value="true" valuetype="data"></param>
<param name="controls" value="yes" valuetype="data"></param></object>
-
- Posts: 3
- Joined: Tue Aug 18, 2020 12:36 am
Re: Disable autoplay in embedded videos
We use OxygenXML for authoring and editing, but we use an external build system, so that could be where the error is occurring? The HTML for the video once it's rendered is:
Any ideas or suggestions would be very helpful. Thanks!
Code: Select all
<object type="video/mp4" height="360" data="link-to-video-here.mp4" width="640">
<param name="autoplay" value="false" valuetype="data"></param>
<param name="allowFullScreen" value="true" valuetype="data"></param>
<param name="controls" value="yes" valuetype="data"></param></object>
-
- Posts: 9416
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Disable autoplay in embedded videos
Hi,
You need to install this extra free plugin in the DITA Open Toolkit you are using for publishing:
https://github.com/oxygenxml/dita-media-support
It will generate modern HTML <video> and <iframe> elements from your DITA objects.
Regards,
Radu
You need to install this extra free plugin in the DITA Open Toolkit you are using for publishing:
https://github.com/oxygenxml/dita-media-support
It will generate modern HTML <video> and <iframe> elements from your DITA objects.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9416
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Disable autoplay in embedded videos
Hi,
Have you integrated the plugin after copying it to your DITA OT plugins folder? How does the generated HTML output look like? Does it contain <video> elements for each DITA <object> element? Do you specify those @outputclass attribute values on the DITA object elements like exemplified here?
https://www.oxygenxml.com/doc/versions/ ... ideos.html
Regards,
Radu
Have you integrated the plugin after copying it to your DITA OT plugins folder? How does the generated HTML output look like? Does it contain <video> elements for each DITA <object> element? Do you specify those @outputclass attribute values on the DITA object elements like exemplified here?
https://www.oxygenxml.com/doc/versions/ ... ideos.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 21
- Joined: Thu Oct 17, 2019 4:54 pm
Re: Disable autoplay in embedded videos
Hi Radu,
Yes, I integrated the plugin and copied it to the DITA OT plugins folder. It was integrated successfully.
The generated output looks like this:
<iframe frameborder="0" height="468" src="https://videoURL " width="640"></iframe>
This is what the code looks like in Oxygen:
<object width="640" outputclass="iframe" height="468"
data="https://www.iceportal.com/brochures/Med ... e3d99a38f8"
Yes, I integrated the plugin and copied it to the DITA OT plugins folder. It was integrated successfully.
The generated output looks like this:
<iframe frameborder="0" height="468" src="https://videoURL " width="640"></iframe>
This is what the code looks like in Oxygen:
<object width="640" outputclass="iframe" height="468"
data="https://www.iceportal.com/brochures/Med ... e3d99a38f8"
-
- Posts: 9416
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Disable autoplay in embedded videos
Hi,
An HTML <iframe> displays an entire HTML page in there. In your case the page has a video inside but to my knowledge you cannot force the iframe to not start a certain video in the displayed HTML content. You can try to edit directly that HTML output and see if you can find any way to avoid playing that video. In my opinion this would be possible only if that certain web site to which you send GET parameters in the URL query would have a separate URL query like "autoplay=no" which it could interpret on its side. But you would need to discuss this with the web site's owners.
This discussion thread initially discussed producing HTML <video> elements which indeed have parameters which can disable auto play (actually auto play is disabled for videos by default). But these video elements point to video files, not to web sites which contain videos inside them.
Regards,
Radu
An HTML <iframe> displays an entire HTML page in there. In your case the page has a video inside but to my knowledge you cannot force the iframe to not start a certain video in the displayed HTML content. You can try to edit directly that HTML output and see if you can find any way to avoid playing that video. In my opinion this would be possible only if that certain web site to which you send GET parameters in the URL query would have a separate URL query like "autoplay=no" which it could interpret on its side. But you would need to discuss this with the web site's owners.
This discussion thread initially discussed producing HTML <video> elements which indeed have parameters which can disable auto play (actually auto play is disabled for videos by default). But these video elements point to video files, not to web sites which contain videos inside them.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service