SharePoint - To Play Video from Video Library with carousel
Include this below scripts and update the video library as required in a content editor webpart.<script type="text/javascript">
function ShowPlayer(PlayerId) {
var elm = document.getElementById(PlayerId);
elm.style.display = 'block';
}
function HidePlayer(PlayerId) {
var elm = document.getElementById(PlayerId);
elm.style.display = 'none';
}
</script>
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<div style="width:176px;height:104px;background-image:url('/film1.jpg');
cursor:hand;"
onclick="ShowPlayer('divp');
playerp.controls.Play()" >
<div id="divp" style="display:none;">
<object classid='objPlayerID'
id='playerp'
width='174'
height='104'
standby='Please wait while the video is loaded...'>
<param name='url' value='/film1.wmv' />
<param name='src' value='/film1.wmv' />
<param name='TransparentAtStart' value='0' />
<param name='AutoStart' value='0' />
<param name='CurrentMarker' value='0' />
<param name='Balance' value='0' />
<param name='CurrentPosition' value='0' />
<param name='showcontrols' value='false' />
<param name='enablecontextmenu' value='false' />
<param name='fullscreen' value='False' />
<param name='mute' value='false' />
<param name='PlayCount' value='1' />
<param name='rate' value='1.0' />
<param name='uimode' value='none' />
<param name='volume' value='100' />
<embed type='application/x-mplayer2'
pluginspace = 'http://www.microsoft.com/Windows/MediaPlayer/'
name='playerp' ShowStatusBar='0' EnableContextMenu='0' autostart='0'
width = '174' height = '129' loop='false'
transparentatstart='true' src='/film1.wmv' />
</object>
</div>
</div>
<div style="text-align:left;">
<img alt="" src=" /video_play.gif "
title="Play" style="width: 82px;cursor:hand;height: 17px;padding-top:5px;"
onclick="ShowPlayer('divp');playerp.controls.Play()" />
<img alt="" src="/stop.png "
title="Stop" style="width: 23px;cursor:hand;height: 17px;padding-top:5px;"
onclick="HidePlayer('divp');playerp.controls.pause()";playerp.controls.stop(); />
</div>
</div>
Please update the source file, video locations, images for play, stop respectively to work correctly
Happy Browsing!
Relax..
Relax..