discourse-legacysite-perl/site/articles/include_detailed_video.html
2024-06-17 22:24:05 +10:00

30 lines
1.3 KiB
HTML

<%~if URL and URL ne 'http://' %><%set video = $URL%><%endif%>
<%~if Image_URL and Image_URL ne 'http://' %><%set image = $Image_URL%><%endif%>
<%~if video%>
<%~if not image%>
<%~Plugins::ConvertVideo::get_file_path($ID, "image_file_field") %>
<%~set image = $image_file_field_path %>
<%~endif %>
<%~if not video%>
<%~Plugins::ConvertVideo::get_file_path($ID, "flash_file_field") %>
<%~set video = $flash_file_field_path %>
<%~endif%>
<%~Plugins::ConvertVideo::get_flash_dimension() %>
<script type="text/javascript" src="<%config.build_root_url%>/videos/static/swfobject.js"></script>
<div id="player"><a href="<%video%>" style="display:block;width:<%video_width%>px;height:<%video_height%>px"></a></div>
<script type="text/javascript">
var so = new SWFObject('<%config.build_root_url%>/videos/static/mediaplayer.swf', 'mpl', '<%video_width%>', '<%video_height%>', '8');
so.addParam('allowscriptaccess', 'always');
so.addParam('allowfullscreen', 'true');
so.addParam('wmode', 'transparent');
so.addVariable('height', '331');
so.addVariable('width', '400');
so.addVariable("file", "<%video%>");
<%~if image%>so.addVariable("image", "<%image%>"); <%endif%>
so.write('player');
</script>
<%~endif%>
<div class="detail_text">
<%Paragraph1 || ''%>
</div>