Welcome Guest, Not a member yet? Register   Sign In
jw player and dynamic xml playlist
#1

[eluser]Unknown[/eluser]
Hi
I am beginner for CI.
I want to create dynamic playlist with xml and jw player.
But I am facing some error.
For Player

controller
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Welcome extends CI_Controller {

    public function index()
    {    
        $this->load->database();
$data[playlist]=$this->db->get('video')
        $data['head']="This is videopage";
        $this->load->view('videopage',$data);
    }

videopage.php
<style type="text/css">
[removed][removed]
[removed]
var playItem = null;
function createPlayer()
{
var flashvars =
{

file: "http://localhost/ci/player/playlist.php",

autostart: 'true',
shuffle: 'false',
repeat: 'list',
showstop: 'true',
showicons: 'true',
showdigits: 'true',
thumbsinplaylist: 'true',
logo: '',
enablejs: 'true',
javascriptid: 'mpl',
searchbar: 'false',
backcolor: '0xFFFFFF', // face of buttons
frontcolor: '0x404040', // button symbols & playlist text
lightcolor: '0x808080', // highlighted playlist item
screencolor: '0x000000' // screen background color
};

var params =
{
allowfullscreen: 'true',
wmode: 'opaque',
swliveconnect: 'true'
};

var attributes =
{
id: 'mpl',
name: 'mpl'
};

if(swfobject.getQueryParamValue('item'))
{
playItem = swfobject.getQueryParamValue('item');
}

swfobject.embedSWF('http://localhost/ci/player/mediaplayer.swf', 'player', '700', '320', '9.0.115', false, flashvars, params, attributes);

};
[removed]

[removed]
function loadFile(swf, obj)
{
thisMovie(swf).loadFile(obj);
};


function thisMovie(movieName)
{
if(navigator.appName.indexOf('Microsoft') != -1)
{
return window[movieName];
}
else
{
return document[movieName];
}
};
[removed]

</head>

<body>

<div id="playercontainer" class="playercontainer">
<a id="player" class="player" href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Get the Flash Plugin to see this gallery.</a>
</div>

playlist.php
Code:
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
<playlist version="1" >
&lt;?php foreach($playlist->result() as $row): ?&gt;
<trackList>
<track>

&lt;title&gt;&lt;?=$row->video_title?&gt;&lt;/title&gt;
<location>&lt;?=base_url($row->video_file)?&gt;</location>
<identifier>spiderman</identifier>
</track>

</trackList>
&lt;?php endforeach; ?&gt;
</playlist>
?&gt;

for above code, xml playlist is not work.
I want to know where is false.
Help me.
Thank for all.
Sorry for my poor english


Messages In This Thread
jw player and dynamic xml playlist - by El Forum - 07-07-2011, 10:47 PM
jw player and dynamic xml playlist - by El Forum - 07-08-2011, 04:45 PM
jw player and dynamic xml playlist - by El Forum - 07-08-2011, 09:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB