@@ -3,10 +3,95 @@ module Web
33 module Player
44 module Rails
55 module ViewHelpers
6+ # Generates the HTML markup needed for the podlove audio player and calls the podlovewebplayer
7+ # js method with given option parameters.
8+ #
9+ # @param [Hash] options options for the player
10+ # @option options [String] :src The location of an audio file, local ore remote.
11+ # @option options [String] :type The media type of the resource.
12+ # @option options [String] :mp4 The location of an audio file with the type mp4.
13+ # @option options [String] :mp3 The location of an audio file with the type mp3.
14+ # @option options [String] :ogg The location of an audio file with the type ogg.
15+ # @option options [String] :opus The location of an audio file with the type opus.
16+ # @option options [String] :poster The location of the cover image for the rich audio player.
17+ # @option options [integer] :width (auto) The width of the player.
18+ # @option options [integer] :height The height of the player.
19+ # @option options [boolean] :loop (false) Loops the audio when it ends.
20+ # @option options [boolean] :preload (true) Start loading the audio as soon as possible,
21+ # before the user clicks play. This might not work on all browsers.
22+ # @option options [boolean] :autoplay (false) Start playing the audio as soon as it's ready.
23+ # This might not work on all (mobile) devices.
24+ # @option options [String] :duration (false) Enables display of duration without having to load the
25+ # media file. Use seconds or timecode as a unit
26+ # (e.g. "3522" or "00:58:42")
27+ # @option options [boolean] :alwaysShowHours (true) Displays the time in 00:00:00 instead of 00:00.
28+ # @option options [boolean] :alwaysShowControls (true) Defines whether the player control bar is
29+ # permanently visible.
30+ # @option options [boolean] :volume (true) Disables the volume slider.
31+ # @option options [boolean] :progress (true) Disables the progress bar.
32+ # @option options [String] :captions URL to a WebVTT captions file.
33+ # @option options [boolean] :chapters Takes chapter string in JSON format and builds an interactive
34+ # chapter table. Chapters must be written in the following format:
35+ # !{'start':'00:00:00.000', 'title':'Chapter One', 'image':''}
36+ # @option options [String] :chapterlinks (all) Option for the jumplink behaviour in chapter table.
37+ # Options are: 'all' (all chapter links are clickable), 'buffered' (only
38+ # buffered chapters are clickable), 'false' (chapters are not linked)
39+ # @option options [boolean] :chaptersVisible (false) Defines the default visibility status of
40+ # toggable chapters module.
41+ # @option options [boolean] :timecontrolsVisible (false) Defines the default visibility status of
42+ # toggable time controls module.
43+ # @option options [boolean] :summaryVisible (false) Defines the default visibility status of
44+ # toggable summary module.
45+ # @option options [boolean] :downloadbuttonsVisible (false) Defines the default visibility of the
46+ # download buttons.
47+ # @return [String] HTML markup and JS call.
648 def podloveaudio ( options = { } )
749 podlove ( "audio" , options )
850 end
951
52+ # Generates the HTML markup needed for the podlove video player and calls the podlovewebplayer
53+ # js method with given option parameters.
54+ #
55+ # @param [Hash] options options for the player
56+ # @option options [String] :src This location of an video file, local ore remote.
57+ # @option options [String] :type The media type of the resource.
58+ # @option options [String] :mp4 The location of an audio file with the type mp4.
59+ # @option options [String] :webm The location of an audio file with the type webm.
60+ # @option options [String] :ogg The location of an audio file with the type ogg.
61+ # @option options [String] :poster The location of the poster frame for the video.
62+ # @option options [integer] :width (auto) The width of the player.
63+ # @option options [integer] :height The height of the player.
64+ # @option options [boolean] :loop (false) Loops the video when it ends.
65+ # @option options [boolean] :preload (true) Start loading the video as soon as possible,
66+ # before the user clicks play. This might not work on all browsers.
67+ # @option options [boolean] :autoplay (false) Start playing the video as soon as it's ready.
68+ # This might not work on all (mobile) devices.
69+ # @option options [boolean] :fullscreen (true) Disables the fullscreen button for video.
70+ # @option options [string] :duration (false) Enables display of duration without having to load the
71+ # media file. Use seconds or timecode as a unit
72+ # (e.g. "3522" or "00:58:42")
73+ # @option options [boolean] :alwaysShowHours (true) Displays the time in 00:00:00 instead of 00:00.
74+ # @option options [boolean] :alwaysShowControls (true) Defines whether the player control bar is
75+ # permanently visible. It might be suitable to fade the
76+ # controls out when not hovering the video.
77+ # @option options [boolean] :volume (true) Disables the volume slider.
78+ # @option options [boolean] :progress (true) Disables the progress bar.
79+ # @option options [String] :captions URL to a WebVTT captions file.
80+ # @option options [boolean] :chapters Takes chapter string in JSON format and builds an interactive
81+ # chapter table. Chapters must be written in the following format:
82+ # !{'start':'00:00:00.000', 'title':'Chapter One', 'image':''}
83+ # @option options [String] :chapterlinks (all) Option for the jumplink behaviour in chapter table.
84+ # Options are: 'all' (all chapter links are clickable), 'buffered' (only
85+ # buffered chapters are clickable), 'false' (chapters are not linked)
86+ # @option options [boolean] :chaptersVisible (false) Defines the default visibility status of
87+ # toggable chapters module.
88+ # @option options [boolean] :timecontrolsVisible (false) Defines the default visibility status of
89+ # toggable time controls module.
90+ # @option options [boolean] :summaryVisible (false) Defines the default visibility status of
91+ # toggable summary module.
92+ # @option options [boolean] :downloadbuttonsVisible (false) Defines the default visibility of the
93+ # download buttons.
94+ # @return [String] HTML markup and JS call.
1095 def podlovevideo ( options = { } )
1196 podlove ( "video" , options )
1297 end
0 commit comments