1.7k questions

3.2k answers

1.7k comments

398 users

Categories

1.7k questions

3.2k answers

1.7k comments

398 users

0 votes

Has anyone been able to successfully embed videos into CRM?

asked by chriswhisenhunt (3.9k points)

1 Answer

0 votes
 
Best answer

Looks like videos are not supported as field types like photos are. I created a view form that selected the video url out of our custom video table. Then in the html I did the following:

<span id="#MAP#VIDEOURL_value" style="float: right; display: none;"></span>
  <video id="MyVideo" controls style="float: right;">
    Your browser does not support the video tag.
  </video>

and then

<script type="text/javascript" language="javascript">
  function setUrl() {
    var url = $("##MAP#VIDEOURL_value").text();
    var video = document.getElementById('MyVideo');
    var source = document.createElement('source');

    source.setAttribute('src', url);

    video.appendChild(source);
  }

  //the view form doesnt load the value in time so 
  //we have to give the platform a second to wait
  setTimeout(setUrl, 1000);
</script>
answered by chriswhisenhunt (3.9k points)
selected by chriswhisenhunt
...