c80_flowplayer 0.1.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source :rubygems
2
+
3
+ gemspec
@@ -0,0 +1,33 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ flowplayer (0.1.3)
5
+ json
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ diff-lcs (1.1.3)
11
+ json (1.7.6)
12
+ mocha (0.9.12)
13
+ nokogiri (1.4.4)
14
+ rake (10.0.3)
15
+ rspec (2.4.0)
16
+ rspec-core (~> 2.4.0)
17
+ rspec-expectations (~> 2.4.0)
18
+ rspec-mocks (~> 2.4.0)
19
+ rspec-core (2.4.0)
20
+ rspec-expectations (2.4.0)
21
+ diff-lcs (~> 1.1.2)
22
+ rspec-mocks (2.4.0)
23
+
24
+ PLATFORMS
25
+ ruby
26
+
27
+ DEPENDENCIES
28
+ bundler (>= 1.0.0)
29
+ flowplayer!
30
+ mocha
31
+ nokogiri
32
+ rake
33
+ rspec (~> 2.4.0)
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2011 Scott Davis
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
@@ -0,0 +1,33 @@
1
+ [![Build Status](https://travis-ci.org/scottdavis/flowplayer-gem.png?branch=master)](https://travis-ci.org/scottdavis/flowplayer-gem)
2
+ # Flowplayer Helper for Rails 3 applications
3
+
4
+ 1. `gem 'flowplayer'` in your gem file
5
+ 2. copy assets
6
+ - With asset pipeline `rails g flowplayer` or `rails g flowplayer commercial`
7
+ - Without asset pipeline ` rails g flowplayer --without-asset-pipeline` or `rails g flowplayer commercial --without-asset-pipeline`
8
+ 3. add `javascript_include_tag 'flowplayer.min.js'` to your application layout
9
+ 4. read below
10
+
11
+ ##Usage
12
+
13
+ <a id='video' style='display:block;width:512px;height312px;'>
14
+
15
+ For JQuery
16
+
17
+ = flowplayer_for :video, '/flowplayer.swf', 'jquery' do |player|
18
+ - player.playlist [{:url => "video_still.jpg" }, {:url => "video_512x288.flv", :autoPlay => false, :autoBuffering => true }]
19
+ - player.onLoad do
20
+ - 'this.unmute();'
21
+ For Prototype
22
+
23
+ = flowplayer_for :video, '/flowplayer.swf', 'prototype' do |player|
24
+ - player.playlist [{:url => "video_still.jpg" }, {:url => "video_512x288.flv", :autoPlay => false, :autoBuffering => true }]
25
+ - player.onLoad do
26
+ - 'this.unmute();'
27
+
28
+ ## Configs are the same ones here
29
+
30
+ http://flowplayer.org/documentation/api/index.html
31
+
32
+ ## TODO
33
+ More documentation
@@ -0,0 +1,326 @@
1
+ Version history:
2
+
3
+ 3.2.5
4
+ -----
5
+ - added new scaling option 'crop' that resizes to fill all available space, cropping on top/bottom or left/right
6
+ - improvements to RSS file parsing
7
+ - Now displays a hand cursor when a linkUrl is used in clips
8
+
9
+ 3.2.4
10
+ -----
11
+ - new flowplayer.js version, with Apple iDevice fixes
12
+
13
+ 3.2.3
14
+ -----
15
+ - a new 'type' clip property exposed to JS
16
+ - changed the clip type property to better work as a read-write property. Now accepts 'video', 'audio',
17
+ 'image' and 'api' as configuration values.
18
+ - moved parallel rtmp connection mechanism from the RTMP plugin to Core so other plugins can use it (ie: securestreaming)
19
+ Fixes:
20
+ - fixed #112, wrong URL computation when using clip with relative URL on a page with a / after a # in its url
21
+ - fixed #111, wrong behavior of pre/post roll images with duration 0
22
+ - fixed multiple license keys logic
23
+ Fixes:
24
+ - correct verification of license keys in *.ca domains
25
+ - fix to make playback to always reach end of video
26
+
27
+ 3.2.2
28
+ -----
29
+ Fixes:
30
+ - Now recognizes following kind of urls as audio clips: 'mp3:audiostreamname' (ulrs with mp3 prefix and no extension)
31
+ - Now ignores the duration from metadata if we already got one. Fix required for pseudostreaming
32
+ - Fix to reuse buffered data when replaying a clip
33
+
34
+ 3.2.1
35
+ ---------
36
+ - Support for RTMP redirects (tested with Wowza loadbalancing)
37
+ - Fixed video size when no size info available in clip metadata
38
+
39
+ Fixes:
40
+ - Fix to correctly detect if the player SWF name contains a version number and if it does also use the version number
41
+ when it automatically loads the controls plugin.
42
+
43
+ 3.2.0
44
+ -----
45
+ - canvas, controlbar and the content plugin backgound color and border color can be now given with rgb() and rgba() CSS style syntax
46
+ - Added onMouseOver() and onMouseOut() listener registration methods to the Flowplayer API
47
+ - enhancements to RSS playlist. Converted parsing to E4X, yahoo media and flowplayer namespace support.
48
+ - added feature to obtain bitrate and dimension information to a new clip custom property "bitrates" for future support for bitrate choosing.
49
+ - added getter for playerSwfName config
50
+ - if clip.url has the string "mp3:" in it, the clip.type will report 'audio'
51
+ - added setKeyboardShortcutsEnabled(), addKeyListener(), removeKeyListener() to FlowplayerBase
52
+ Fixes:
53
+ - onSeek() was not fired when seeking while paused and when using RTMP. An extra onStart was fired too.
54
+ - fireErrorExternal() was not working properly with an error PlayerEvent
55
+ - countPlugins() was throwing an error when a plugin was not found
56
+ - external swf files were not scaled properly
57
+ - the logo was unnecessary shown when going fullscreen if logo.displayTime was being used
58
+ - added a loadPluginWithConfig method to FlowplayerBase, accessible from javascript. Fixed double onload callback call.
59
+ - now handles cuepoint parameters injected using the Adobe Media Encoder
60
+ - showPlugin was not working when config.play was null
61
+ - handles 3-part duration values included in FLV metadata, like "500.123.123"
62
+ - player wasn't always reaching end of video
63
+ - fixed broken buffering: false
64
+ - fixed event dispatching when embedding flowplayer without flowplayer.js (=without playlist config field)
65
+ - fixed safari crashes when unloading player
66
+ - fixed scrubber behaviour with a playlist containing 2 images (or swf) in a row
67
+ - fixed errors in logs when using an RSS playlist
68
+ - fixed OverlayPlayButton that was showing even if it shouldn't on some cases
69
+ - fixed wrong behavior when onBeforeFinish was returning false within playlists
70
+ - /!\ Don't use the fadeIn / fadeOut controlbar's API while using autoHide.
71
+ - fixed play state button with images
72
+ - fixed splash image flickering
73
+
74
+ 3.1.5
75
+ -----
76
+ Fixes:
77
+ - The player went to a locked state when resuming playback after a period that was long enought to send the
78
+ netConnection to an invalid state. Now when resuming playback on an invalid connection the clip starts again from
79
+ the beginning. This is only when using RTMP connections and does not affect progressive download playback.
80
+ - Custom netConnect and netStream events did not pass the info object to JS listeners
81
+
82
+ 3.1.4
83
+ -----
84
+ Fixes:
85
+ - player did not initialize if the controlbar plugin was disabled and if the play button overlay was disabled with play: null
86
+ - works properly without cachebusting on IE
87
+ - RSS playlist parsing now respects the isDefault attribute used in mRSS media group items
88
+ - Fixed passing of connection arguments
89
+
90
+ 3.1.3
91
+ -----
92
+ - enhancements to RSS playlist parsing: Now skips all media:content that have unsupported types. Now the type attribute
93
+ of the media:content element is mandatory and has to be present in the RSS file
94
+ - Possibility to pass a RSS file name with playFeed("playlist.rss") and setPlaylist("playlist.rss") calls.
95
+ - changes to the ConnectionProvider and URLResolver APIs
96
+ - Now automatically uses a plugin that is called 'rtmp' for all clips that have the rtmp-protocol in their URLs.
97
+ - Added possibility to specify all clip properties in an RSS playlist
98
+
99
+ Fixes:
100
+ - the result of URL resolvers in now cached, and the resolvers will not be used again when a clip is replayed
101
+ - some style properties like 'backgroundGradient' had no effect in config
102
+ - video goes tiny on Firefox: http://flowplayer.org/forum/8/23226
103
+ - RSS playlists: The 'type' attribute value 'audio/mp3' in the media:content element caused an error.
104
+ - Dispatches onMetadata() if an URL resolver changes the clip URL (changes to a different file)
105
+ - error codes and error message were not properly passed to onEvent JS listeners
106
+
107
+ 3.1.2
108
+ -----
109
+ - The domain of the logo url must the same domain from where the player SWF is loaded from.
110
+ - Fullscreen can be toggled by doublclick on the video area.
111
+ Fixes:
112
+ - Player was not initialized correctly when instream playlists were used and the provider used in the instream clips was defined in the common clip.
113
+ - A separator in the Context Menu made the callbacks in the following menu items out of order. Related forum post: http://flowplayer.org/forum/8/22541
114
+ - the width and height settings of a logo were ignored if the logo was a sWF file
115
+ - volume control and mute/unmute were not working after an instream clip had been played
116
+ - now possible to use RTMP for mp3 files
117
+ - Issue 12: cuepointMultiplier was undefined in the clip object set to JS event listeners
118
+ - Issue 14: onBeforeStop was unnecessarily fired when calling setPlaylist() and the player was not playing,
119
+ additionally onStop was never fired even if onBeforeStop was
120
+ - fixed screen vertical placement problems that reappeared with 3.1.1
121
+ - The rotating animation now has the same size and position as it has after initialized
122
+
123
+ 3.1.1
124
+ -----
125
+ - External configuration files
126
+ - Instream playback
127
+ - Added toggleFullscreen() the API
128
+ - Possibility to specify controls configuration in clips
129
+ - Seek target position is now sent in the onBeforeSeek event
130
+ Fixes:
131
+ - The screen size was initially too small on Firefox (Mac)
132
+ - Did not persist a zero volume value: http://www.flowplayer.org/forum/8/18413
133
+
134
+ 3.1.0
135
+ -----
136
+ New features:
137
+ - clip's can have urlResolvers and connectionProviders
138
+ - Added new configuration options 'connectionCallbacks' and 'streamCallbacks'. Both accept an Array of event names as a value.
139
+ When these events get fired on the connection or stream object, corresponding Clip events will be fired by the player.
140
+ This can be used for example when firing custom events from RTMP server apps
141
+ - Added new clip event types: 'onConnectionEvent' and 'onStreamEvent' these get fired when the predefined events happen on the connection and stream objects.
142
+ - Added Security.allowDomain() to allow loaded plugins to script the player
143
+ - Added addClip(clip, index) to the API, index is optional
144
+ - Possibility to view videos without metadata, using clip.metaData: false
145
+ - Now the player's preloader uses the rotating animation instead of a percent text to indicate the progress
146
+ of loading the player SWF. You can disable the aninamtion by setting buffering: false
147
+ - calling close() now does not send the onStop event
148
+ - Clip's custom properties are now present in the root of the clip argument in all clip events that are sent to JS.
149
+
150
+ Bug fixes:
151
+ - The preloader sometimes failed to initialize the player
152
+ - Allow seeking while in buffering state: http://flowplayer.org/forum/8/16505
153
+ - Replay of a RTMP stream was failing after the connection had expired
154
+ - Security error when clicking on the screen if there is an image in the playlist loaded from a foreign domain
155
+ - loadPlugin() was not working
156
+ - now fullscreen works with Flash versions older than 9.0.115, in versions that do not support hardware scaling
157
+ - replaying a RTMP stream with an image in front of the stream in the playlist was not working (video stayed hidden). Happened
158
+ because the server does not send metadata if replaying the same stream.
159
+ - the scrubber is disabled if the clip is not seekable in the first frame: http://flowplayer.org/forum/8/16526
160
+ By default if the clip has one of following extensions (the typical flash video extensions) it is seekable
161
+ in the first frame: 'f4b', 'f4p', 'f4v', 'flv'. Added new clip property seekableOnBegin that can be used to override the default.
162
+
163
+ 3.0.6
164
+ -----
165
+ - added possibility to associate a linkUrl and linkWindow to the canvas
166
+ Fixes:
167
+ - fix for entering fullscreen for Flash versions that don't support the hardware scaled fullscreen-mode
168
+ - when showing images the duration tracking starts only after the image has been completely loaded: http://flowplayer.org/forum/2/15301
169
+ - fix for verifying license keys for domains that have more than 4 labels in them
170
+ - if plugin loading failis because of a IO error, the plugin will be discarded and the player initialization continues:
171
+
172
+ 3.0.4
173
+ -----
174
+ - The "play" pseudo-plugin now supports fadeIn(), fadeOut(), showPlugin(), hidePlugin() and
175
+ additionally you can configure it like this:
176
+ // make only the play button invisible (buffering animation is still used)
177
+ play: { display: 'none' }
178
+ // disable the play button and the buffering animation
179
+ play: null
180
+ // disable the buffering animation
181
+ buffering: null
182
+ - Added possibility to seek when in the buffering state: http://flowplayer.org/forum/3/13896
183
+ - Added copyright notices and other GPL required entries to the user interface
184
+
185
+ Fixes:
186
+ - clip urls were not resolved correctly if the HTML page URL had a query string starting with a question mark (http://flowplayer.org/forum/8/14016#post-14016)
187
+ - Fixed context menu for with IE (commercial version)
188
+ - a cuepoint at time zero was fired several times
189
+ - screen is now arranged correctly even when only bottom or top is defined for it in the configuration
190
+ - Fixed context menu for with IE (commercial version)
191
+ - a cuepoint at time zero was fired several times
192
+ - screen is now arranged correctly even when only bottom or top is defined for it in the configuration
193
+ - Now possible to call play() in an onError handler: http://flowplayer.org/forum/8/12939
194
+ - Does not throw an error if the player cannot persist the volume on the client computer: http://flowplayer.org/forum/8/13286#post-13495
195
+ - Triggering fullscreen does not pause the player in IE
196
+ - The play button overlay no longer has a gap between it's pieces when a label is used: http://flowplayer.org/forum/8/14250
197
+ - clip.update() JS call now resets the duration
198
+ - a label configured for the play button overlay did not work in the commercial version
199
+
200
+ 3.0.3
201
+ -----
202
+ - fixed cuepoint firing: Does not skip cuepoints any more
203
+ - Plugins can now be loaded from a different domain to the flowplayer.swf
204
+ - Specifying a clip to play by just using the 'clip' node in the configuration was not working, a playlist definition was required. This is now fixed.
205
+ - Fixed: A playlist with different providers caused the onMetadata event to fire events with metadata from the previous clip in the playlist. Occurred when moving in the playlist with next() and prev()
206
+ - the opacity setting now works with the logo
207
+ - fadeOut() call to the "screen" plugin was sending the listenerId and pluginName arguments in wrong order
208
+ - stop(), pause(), resume(), close() no longer return the flowplayer object to JS
209
+ - changing the size of the screen in a onFullscreen listener now always works, there was a bug that caused this to fail occasionally
210
+ - fixed using arbitrary SWFs as plugins
211
+ - the API method setPlaylist() no longer starts playing if autoPlay: true, neither it starts buffering if autoBuffering: true
212
+ - the API method play() now accepts an array of clip objects as an argument, the playlist is replaced with the specified clips and playback starts from the 1st clip
213
+
214
+ 3.0.2
215
+ -----
216
+ - setting play: null now works again
217
+ - pressing the play again button overlay does not open a linkUrl associated with a clip
218
+ - now displays a live feed even when the RTMP server does not send any metadata and the onStart method is not therefore dispatched
219
+ - added onMetaData clip event
220
+ - fixed 'orig' scaling: the player went to 'fit' scaling after coming back from fullscreen. This is now fixed and the original dimensions are preserved in non-fullscreen mode.
221
+ - cuepoint times are now given in milliseconds, the firing precision is 100 ms. All cuepoint times are rounded to the nearest 100 ms value (for example 1120 rounds to 1100)
222
+ - backgroundGradient was drawn over the background image in the canvas and in the content and controlbar plugins. Now it's drawn below the image.
223
+ - added cuepointMultiplier property to clips. This can be used to multiply the time values read from cuepoint metadata embedded into video files.
224
+ - the player's framerate was increased to 24 FPS, makes all animations smoother
225
+
226
+ 3.0.1
227
+ -----
228
+ - Fixed negative cuepoints from common clip. Now these are properly propagated to the clips in playlist.
229
+ - buffering animation is now the same size as the play button overlay
230
+ - commercial version now supports license keys that allows the use of subdomains
231
+ - error messages are now automatically hidden after a 4 second delay. They are also hidden when a new clips
232
+ starts playing (when onBeforeBegin is fired)
233
+ - added possibility to disable the buffering animation like so: buffering: false
234
+ - pressing the play button overlay does not open a linkUrl associated with a clip
235
+ - license key verification failed if a port number was used in the URL (like in this url: http://mydomain.com:8080/video.html)
236
+ - added audio support, clip has a new "image" property
237
+ - workaround for missing "NetStream.Play.Start" notfication that was happending with Red5. Because of this issue the video was not shown.
238
+ - commercial version has the possibility to change the zIndex of the logo
239
+
240
+ 3.0.0
241
+ -----
242
+ - Removed security errors that happened when loading images from foreign domains (domains other than the domain of the core SWF).
243
+ Using a backgroundImage on canvas, in the content plugin, and for the controls is also possible to be loaded
244
+ from a foreign domain - BUT backgroundRepeat cannot be used for foreign images.
245
+ - Now allows the embedding HTML to script the player even if the player is loaded from another domain.
246
+ - Added a 'live' property to Clips, used for live streams.
247
+ - A player embedded to a foreign domain now loads images, css files and other resources from the domain where the palyer SWF was loaded from. This is to generate shorter embed-codes.
248
+ - Added linkUrl and linkWindow properties to the logo, in commercial version you can set these to point to a linked page. The linked page gets opened
249
+ when the logo is clicked. Possible values for linkWindow:
250
+ * "_self" specifies the current frame in the current window.
251
+ * "_blank" specifies a new window.
252
+ * "_parent" specifies the parent of the current frame.
253
+ * "_top" specifies the top-level frame in the current window.
254
+ - Added linkUrl and linkWindow properties to clips. The linked page is opened when the video are is clicked and the corresponding clip has a linkUrl specified.
255
+ - Made the play button overlay and the "Play again" button slightly bigger.
256
+
257
+ RC4
258
+ ---
259
+ - Now shows a "Play again" button at the end of the video/playlist
260
+ - Commercial version shows a Flowplayer logo if invalidKey was supplied, but the otherwise the player works
261
+ - setting play: null in configuration will disable the play button overlay
262
+ - setting opacity for "play" also sets it for the buffering animation
263
+ - Fixed firing of cuepoints too early. Cuepoint firing is now based on stream time and does not rely on timers
264
+ - added onXMPData event listener
265
+ - Should not stop playback too early before the clip is really completed
266
+ - The START event is now delayed so that the metadata is available when the event is fired, METADATA event was removed,
267
+ new event BEGIN that is dispatched when the playback has been successfully started. Metadata is not normally
268
+ available when BEGIN is fired.
269
+
270
+ RC3
271
+ ---
272
+ - stopBuffering() now dispatches the onStop event first if the player is playing/paused/buffering at the time of calling it
273
+ - fixed detection of images based on file extensions
274
+ - fixed some issues with having images in the playlist
275
+ - made it possible to autoBuffer next video while showing an image (image without a duration)
276
+
277
+ RC2
278
+ ---
279
+ - fixed: setting the screen height in configuration did not have any effect
280
+
281
+ RC1
282
+ -----
283
+ - better error message if plugin loading fails, shows the URL used
284
+ - validates our redesigned multidomain license key correctly
285
+ - fix to prevent the play button going visible when the onBufferEmpty event occurs
286
+ - the commercial swf now correctly loads the controls using version information
287
+ - fixed: the play button overlay became invisible with long fadeOutSpeeds
288
+
289
+ beta6
290
+ -----
291
+ - removed the onFirstFramePause event
292
+ - playing a clip for the second time caused a doubled sound
293
+ - pausing on first frame did not work on some FLV files
294
+
295
+ beta5
296
+ -----
297
+ - logo only uses percentage scaling if it's a SWF file (there is ".swf" in it's url)
298
+ - context menu now correctly builds up from string entries in configuration
299
+ -always closes the previous connection before starting a new clip
300
+
301
+ beta4
302
+ -----
303
+ - now it's possible to load a plugin into the panel without specifying any position/dimensions
304
+ information, the plugin is placed to left: "50%", top: "50%" and using the plugin DisplayObject's width & height
305
+ - The Flowplayer API was not fully initialized when onLoad was invoked on Flash plugins
306
+
307
+ beta3
308
+ -----
309
+ - tweaking logo placement
310
+ - "play" did not show up after repeated pause/resume
311
+ - player now loads the latest controls SWF version, right now the latest SWF is called 'flowplayer.controls-3.0.0-beta2.swf'
312
+
313
+ beta2
314
+ -----
315
+ - fixed support for RTMP stream groups
316
+ - changed to loop through available fonts in order to find a suitable font also in IE
317
+ - Preloader was broken on IE: When the player SWf was in browser's cache it did not initialize properly
318
+ - Context menu now correctly handles menu items that are configured by their string labels only (not using json objects)
319
+ - fixed custom logo positioning (was moved to the left edge of screen in fullscreen)
320
+ - "play" now always follows the position and size of the screen
321
+ - video was stretched below the controls in fullscreen when autoHide: 'never'
322
+ - logo now takes 6.5% of the screen height, width is scaled so that the aspect ratio is preserved
323
+
324
+ beta1
325
+ -----
326
+ - First public beta release
@@ -0,0 +1,30 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'rake'
11
+
12
+
13
+ require 'rspec/core/rake_task'
14
+
15
+ desc 'Default: run specs.'
16
+ task :default => :spec
17
+
18
+ desc "Run specs"
19
+ RSpec::Core::RakeTask.new do |t|
20
+ t.pattern = "./spec/**/*_spec.rb" # don't need this, it's default.
21
+ # Put spec opts in a file named .rspec in root
22
+ t.rspec_opts = ["--color", "--format s"]
23
+ end
24
+
25
+ desc "Generate code coverage"
26
+ RSpec::Core::RakeTask.new(:coverage) do |t|
27
+ t.pattern = "./spec/**/*_spec.rb" # don't need this, it's default.
28
+ t.rcov = true
29
+ t.rcov_opts = ['--exclude', 'spec']
30
+ end