Flash movies on Sharepoint

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?

+3
source share
2 answers

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);
}

, , . !

+2

, , , -, , . Flash -, , .

, , - API - sharepoint ( ), , , , , . .: D

+1

Source: https://habr.com/ru/post/1731470/


All Articles