Hi,
I am unable to get this to work. I am using swfobject 2.1 and swf player 4.6 - below my code.
When I click play for the main video it get an error that says "No suiteable model found for playback of this file"
When I click the links to play the other flv files I can see that the player reloads but when I click play nothing happens.
Below is the code:
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/swfobject.js"></script>
<script language="JavaScript" type="text/javascript">
var player = null;
function playerReady(obj)
{
player = document.getElementById(obj.id);
};
function loadNplay(file, type, author, title, description)
{
player.sendEvent('LOAD', {file:file, type:type, author:author, title:title, description:description });
player.sendEvent('PLAY', 'true');
};
</script>
<script language="JavaScript" type="text/javascript">
var flashvars =
{
autostart: 'false',
fullscreen: 'true',
controlbar: 'bottom',
file: 'Main_Video.flv',
type: 'flash',
author: 'Feature',
title: 'Feature Video',
description: 'The video that is started when the home page is loded.'
};
var params =
{
allowscriptaccess: 'always',
allowfullscreen: 'true'
};
var attributes =
{
name: 'FeatureVid',
id: 'FeatureVid'
};
swfobject.embedSWF('player.swf', 'player', '480', '360', '9.0.124', false, flashvars, params, attributes);
</script>
<a href="#" onclick="javascript:loadNplay('PlayerA.flv', 'flash', 'PlayerA', 'PlayerA Video', 'Description1'); return false;">Link1</a>
<a href="#" onclick="javascript:loadNplay('PlayerB.flv', 'flash', 'PlayerB', 'PlayerB Video', 'Description2'); return false;">Link2</a>
<a href="#" onclick="javascript:loadNplay('PlayerC.flv', 'flash', 'PlayerC', 'PlayerC Video', 'Description3'); return false;">Link3</a>
Thanks
Review the File Properties flashvars here:
http://developer.longtailvideo.com/trac/wiki/FlashVars#Fileproperties
If your media file URL ends in a recognized media file extension, like mp4, flv, jpg, mp3, etc., you don't need to specify the type. If not, the correct type for a FLV file would be video.