We would like to display flash video files (tutorials) on our Sharepoint website. The problem is that we can either stop it from automatically playing (using Windows Media Player) or start playing it by clicking (using the built-in flash version). We currently have a Content Editor web editor with this code:
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="320" HEIGHT="240" id="Tutorial1" ALIGN=""> <PARAM NAME=movie VALUE="video.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#333399> <EMBED src="http://mydomain.com/infocentre/Videos/video.swf" quality=high bgcolor=#333399 WIDTH="320" HEIGHT="240" NAME="video.swf" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"> </EMBED> </OBJECT>
Any idea how we can get the play button or start playing a video after a user clicks on it?
SWF, ( ). - HTML- javascript DOM click. , , - , , .
SWF, - :
<a id="player" href="#" onclick="playfile()">Play File</a>
playfile()
function playfile() { // create the param and embed tags, set their values var param = document.createElement('param'); param.name = "movie"; param.value = "video.swf"; var embed = document.createElement('embed'); embed.src = "video.swf"; embed.quality = "high"; embed.bgcolor = "#333399"; embed.width = 320; embed.height = 240; embed.name = "video.swf"; // create the object tag and add the param and embed children var object = document.createElement('object'); object.width = 320; object.height = 240; object.appendChild(param); object.appendChild(embed); // add new element after A tag document.getElementById('player').appendChild(object); }
, , . !
, , , -, , . Flash -, , .
, , - API - sharepoint ( ), , , , , . .: D
Source: https://habr.com/ru/post/1731470/More articles:Eclipse cdt command line input - command-lineHow to print date and time in xs: dateTime format in Perl? - xmlConditional root_url (index) - ruby-on-railsSQL - NOT IN explained - sqlsqlite & flex - insert if not exist? - flexHow to view all records since the last commit in Oracle 10? - databasePython: a problem with metaclasses combined with multiple inheritance - pythonPHP page counter, VS database-based file. Which one is better? - phpRangeValidator issue in ASP.NET - validationRelative advantages of blacklisting IP addresses and blocking accounts - designAll Articles