Skip to content

Commit

Permalink
Yiippod 1.2
Browse files Browse the repository at this point in the history
New version
  • Loading branch information
Shapovalov Alexandr Alexandrovich committed Mar 27, 2014
1 parent c2247bb commit b89e5cb
Show file tree
Hide file tree
Showing 8 changed files with 231 additions and 70 deletions.
134 changes: 134 additions & 0 deletions Yiippod/Yiippod/README.md
@@ -0,0 +1,134 @@
- Yiippod 1.2
_______________________________________________________________________________________

Flash and HTML5 video player without any copyright on screen. Playlists support. Few styles. Based on free
version of Uppod player(http://uppod.ru/). Support: FLV, MP4, AVI, MOV, RTMP, HTTP

//Флэш и ХТМЛ5 видео плеер без каких-либо копирайтов на экране. Поддержка плейлистов. Несколько стилей. Основан на
бесплатной версии Uppod плеера (http://uppod.ru/). Поддерживает: FLV, MP4, AVI, MOV, RTMP, HTTP
_______________________________________________________________________________________

New in 1.2 version:
- Autostart as option

//Новое в версии 1.2:
- Возможность автозапуска

New in 1.1 version:

- Add playlists support
- Add six styles
- Support Open Source Media Framework, and Open Source Media Framework with HLS

//Новое в версии 1.1:
- Добавлена поддержка плейлистов
- Добавлены шесть стилей
- Поддержка Open Source Media Framework, и Open Source Media Framework with HLS

Usage:
Download and extract in: yii_web_root/protected/extensions

//Использование:
Скачайте и распакуйте в: yii_корневая_директория/protected/extensions

Add this code in your view:

//Добавьте данный код к Вашему представлению:

<?php
$this->widget('ext.Yiippod.Yiippod', array(
'video'=>"http://www.youtube.com/watch?v=qD2olIdUGd8", //if you don't use playlist
//'video'=>"http://www.youtube.com/watch?v=qD2olIdUGd8", //if you use playlist
'id' => 'yiippodplayer',
'autoplay'=>true,
'width'=>640,
'view'=>6,
'height'=>480,
'bgcolor'=>'#000'
));

?>

Where:

'video' => address to media file or video stream,
'id' => player id,
'width' => player width,
'height' => player height,
'autoplay'=> autostrat (true/false),
'bgcolor' => player background color before player loading
'view'=> player styles integer form 1 to 6

//Где:

'video' => адрес да медиа файла либо потока видео,
'id' => идентификатор плеера,
'width' => ширина плеера,
'height' => высота плеера,
'autoplay'=> автопроигрывание (true/false),
'bgcolor' => задний фон плеера перед его полной загрузкой
'view'=> стиль плеера целочисленные значения от 1 до 6


Open Source Media Framework:
If you want to use version with Open Source Media Framework or Open Source Media Framework with HLS
please rename ext/Yiippod/assets/uppod-osmf.swf to ext/Yiippod/assets/uppod.swf or ext/Yiippod/assets/uppod-osmfhls.swf to ext/Yiippod/assets/uppod.swf

//Open Source Media Framework:
Если Вы хотите использовать версию с Open Source Media Framework или Open Source Media Framework и HLS
пожалуйста переименуйте ext/Yiippod/assets/uppod-osmf.swf в ext/Yiippod/assets/uppod.swf либо ext/Yiippod/assets/uppod-osmfhls.swf в ext/Yiippod/assets/uppod.swf

Playlist usage:
If you want to add few video files in player, please edit this file: ext/Yiippod/assets/playlist.txt

{"playlist":[
{"comment":"First_file_or_stream_name","file":"URL_to_first_file_or_stream"},
{"comment":"Second_file_or_stream_name","file":"URL_to_second_file_or_stream"} ...

]}

And then you must delete 'video'=>"", or comment it in your view:

<?php
$this->widget('ext.Yiippod.Yiippod', array(
'id' => 'yiippodplayer',
'width'=>640,
'view'=>6,
'autoplay'=>true,
'height'=>480,
'bgcolor'=>'#000'
));

?>

//Использование плейлистов:
Если Вы хотите добавить несколько видео в плеер, пожалуйста оредактируйте файл: ext/Yiippod/assets/playlist.txt

{"playlist":[
{"comment":"Название_первого_видео","file":"Ссылка_до_первого_видео"},
{"comment":"Название_второго_видео","file":"Ссылка_до_второго_видео"} ...

]}

И затем вы должны удалить 'video'=>"", или закомментировать его в представлении:

<?php
$this->widget('ext.Yiippod.Yiippod', array(
'id' => 'yiippodplayer',
'width'=>640,
'view'=>6,
'autoplay'=>true,
'height'=>480,
'bgcolor'=>'#000'
));

?>



author Alexander Shapovalov <mail@shapovalov.org>

//автор Александр Шаповалов <mail@shapovalov.org>
36 changes: 23 additions & 13 deletions Yiippod/Yiippod/Yiippod.php
Expand Up @@ -6,11 +6,13 @@
<?php
$this->widget('ext.Yiippod.Yiippod', array(
'video'=>"http://www.youtube.com/watch?v=qD2olIdUGd8",
'video'=>"http://www.youtube.com/watch?v=qD2olIdUGd8", //or comment this string if you use playlist
'id' => 'yiippodplayer',
'width'=>640,
'height'=>480,
'autoplay'=>true,
'bgcolor'=>'#000'
'view'=>6,
));
?>
Expand All @@ -22,7 +24,6 @@ class Yiippod extends CWidget
* @var string
*/
public $swfUrl;

/** The media file or stream video URL -\- Адрес медиа файла или потока (RTMP, mov, mp4, flv, avi)
* The media file must be a string -\- Адрес к файлу\потоку должен иметь строковой тип данных
*
Expand All @@ -41,21 +42,32 @@ class Yiippod extends CWidget
* @var string
*/
public $bgcolor;
/** Player view - style (1-6). -\- Стиль плеера от 1 до 6
* @var integer
*/
public $view;
/** Player id. -\- Идентификатор ИД плеера
* @var string
*/
public $id;
/** autopaly - true \ false
* @var bool
*/
public $autoplay;
/** The js scripts to register -\- Путь до скрипта uppod'a
* @var array
*/
private $js = array(
'uppod.js'
);

/** The asset folder after published -\- Папка со скриптами после публикации
* @var string
*/
private $assets;
private $assets;
/** The path to playlist
* @var string
*/
protected $playlist;
/**
* Publishing the assets -\- Публикация скриптов
**/
Expand Down Expand Up @@ -84,11 +96,13 @@ public function init()
{
$this->publishAssets();
$this->registerScripts();

if(!isset($this->width) or $this->width < 320 or empty($this->width)) $this->width = 320;
if(!isset($this->height) or $this->height < 240 or empty($this->height)) $this->height = 240;
if(!isset($this->bgcolor) or empty($this->bgcolor)) $this->bgcolor = '#FFF';
if(!isset($this->id) or empty($this->id)) $this->id = 'uppodplayer';
$this->playlist=$this->assets.'/playlist.txt';
if(!isset($this->width)) $this->width = 320;
if(!isset($this->height)) $this->height = 240;
if(!isset($this->bgcolor)) $this->bgcolor = '#FFF';
if(!isset($this->id)) $this->id = 'yiippodplayer';
if(!isset($this->autoplay))$this->autoplay=false;
if(empty($this->view)) $this->view = 6;
if(!isset($this->swfUrl)) $this->swfUrl = $this->assets."/uppod.swf";
}
/**
Expand All @@ -97,10 +111,6 @@ public function init()
*/
public function run()
{

$this->render('yiippod');

}


}
4 changes: 4 additions & 0 deletions Yiippod/Yiippod/assets/playlist.txt
@@ -0,0 +1,4 @@
{"playlist":[
{"comment":"SD","file":"rtmp://www.planeta-online.tv:1936/live/channel_3"},
{"comment":"HD","file":"rtmp://www.planeta-online.tv:1936/live/channel_4"}
]}
Binary file added Yiippod/Yiippod/assets/uppod-osmf.swf
Binary file not shown.
Binary file added Yiippod/Yiippod/assets/uppod-osmfhls.swf
Binary file not shown.
Binary file modified Yiippod/Yiippod/assets/uppod.swf
Binary file not shown.
Binary file added Yiippod/Yiippod/assets/uppod_old.swf
Binary file not shown.
127 changes: 70 additions & 57 deletions Yiippod/Yiippod/views/yiippod.php

Large diffs are not rendered by default.

0 comments on commit b89e5cb

Please sign in to comment.