пятница, 1 февраля 2013 г.

установка flowplayer на друпал

Reported installs: 7727 sites currently report using this module. .

The flowplayer_add() function will add the Flowplayer JavaScript to the page, as well as register the Drupal JavaScript behaviors to load the Flowplayer appropriately. The first argument is the jQuery selector to apply the Flowplayer element to. The second argument is the . Using flowplayer_add requires you to already have the markup created.<?phpВP $video = '<a href="http://player-e7.simplecdn.net/flowplayer.flv" id="player" class="flowplayer"></a>';ВP flowplayer_add('#player', array(ВPВPВP 'clip' => array(ВPВPВPВPВP 'autoPlay' => FALSE, // Turn autoplay offВPВPВPВPВP 'linkUrl' => 'http://flowplayer.org', // When clicked onВPВPВP ),ВP ));?>

Calling theme('flowplayer') will not only add the correct JavaScript to the page, but also construct the markup for you. The second argument passed through here is the video URL, but you can pass the instead as seen below.<?phpВP $video = theme('flowplayer', 'http://player-e7.simplecdn.net/flowplayer.flv');ВP $video2 = theme('flowplayer', array(ВPВPВP 'clip' => array(ВPВPВPВPВP 'url' => 'http://player-e7.simplecdn.net/flowplayer.flv',ВPВPВPВPВP 'autoPlay' => FALSE, // Turn autoplay offВPВPВP ),ВP ));?>

To create Flowplayer elements, you can either use the theme('flowplayer') function, or the flowplayer_add() function. The theme function will add the JavaScript to the page, as well as create the markup for you, while the flowplayer_add() function will just add the JavaScript. To see both methods in action, install the module, and visit admin/help/flowplayer.

Stripped down to just the API to provide an integration point for other modules

An API module to provide integration with the GPL licensed for Flash video playback.

Комментариев нет:

Отправить комментарий