ビデオコントロール(カスタムコントロール)

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">

	<video width="#{javascript:return compositeData.width}" height="#{javascript:return compositeData.height}"
		controls="#{javascript:return compositeData.controls}" autoplay="#{javascript:return compositeData.autoplay}"
		loop="#{javascript:return compositeData.loop}">
		<source src="#{javascript:return compositeData.src}" type="video/mp4" />

		Your browser does not support the video tag.
	</video>

</xp:view>





compositeData.autoplay autoplay   :Specifies that the video will start playing as soon as it is ready.
compositeData.controls controls   :Specifies that video controls should be displayed (such as a play/pause button etc).
compositeData.height   pixels     :Sets the height of the video player.
compositeData.loop   loop     :Specifies that the video will start over again, every time it is finished.
compositeData.muted  muted    :Specifies that the audio output of the video should be muted.
compositeData.poster  URL     :Specifies an image to be shown while the video is downloading, or until the user hits the play button.
compositeData.preload        :Specifies if and how the author thinks the video should be loaded when the page loads.
                                       auto
                                       metadata
                                       none
compositeData.src    URL     :Specifies the URL of the video file.
compositeData.width   pixels     :Sets the width of the video player.

※上記サンプルは、IEのみで使用する場合です。
必要に応じて書き換えてください。

以下のブログで紹介しました。
https://ameblo.jp/mak1005/entry-12367405768.html



JavaScript (Server)
mak
June 15, 2018 at 12:03 AM
Rating
0





No comments yetLogin first to comment...