/
docs.txt
151 lines (93 loc) · 5.11 KB
/
docs.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
The jQuery Media Player plugin
by Richard Hulse (richard.hulse@radionz.co.nz)
Copyright (c) 2008, Radio New Zealand Limited
==================
NOTES
==================
The plugin will load an MP3 or OGG Vorbis file and play it. The running time and current volume can be fetched and displayed.
There is much to do, such as:
* Add id3 data population of player title and description
* Allow an audio metadata structure to be used on the load function
* Playlist functionality
The player will be implemented as a set of plugins so that anyone can build the exact functionality that they want.
==================
To Use the examples
==================
Add the jQuery library v 1.2.6 and an MP3 or OGG file to the working directory and edit example.html to play it.
Example 01
This is a plain old player that show the basic functionality of the module, with a simple slider. The slider does not have the ability to seek in the media yet
Example 02
This has a main window which pops up the player in a second window. It assumes that only an ID is required by the player, and that the player will go and fetch the data from somewhere (via ajax, for example).
Does not do anything else yet...
Example 03
This opens the media in the popup window and plays it. Simple and Easy.
It works by attaching a popup event to all audio links on the page, and sending the full file path to the player.
You can have MP3 and Vorbis links on the same page and they'll play (in Firefox 3.1).
==================
Files included
==================
Flash files:
audioplayer.as
audioplayer.fla
audioplayer.swf
expressInstall.swf
Example files:
example-01.html
example-02.html
example-03.html
example-events.html
example.css
The plugins:
jquery.cookie.js
jquery.cookieplaylist.js
jquery.attacheplayerpopup.js
jquery.fdslider.js
jquery.mediaplayer.js
audio tag event processing:
eventwatcher.js
Graphics
Play Icons.png (An Adobe Fireworks file)
play-icons.png
0.gif
==================
LICENSE
==================
The code written by Radio NZ is released under the GPL V2.0 or later.
The license used by other code is noted in the source, but is compatible.
The graphics files (Player Buttons) are licensed under a Attribution-Noncommercial-Share Alike 3.0 (New Zealand).
Graphics files are from Radio New Zealand's media player
project at: http://github.com/rhulse/audio-player/wikis/home
==================
RELEASES
==================
#0.25 (16 December)
Internally the media playing elements are now created as objects. This caused a few bugs which were fixed.
Code was added to example 2 to allow the player to autoplay a file by id instead of by URL. The URL is stored in an object, but this could just as easily be return from a CMS via AJAX.
Other bugs fixed includes the slider stability bug from 0.22 below.
Another example was added - example-events.html - to proved a method to track events sent from the audio tag. This is for debugging as the HTML5 spec evolves.
There is also an example of video tag use (you'll need to supply your own file to test this)
# 0.22 (3 Dec 2008)
The time slider now will cause the player to seek when it is clicked.
There are two known issues:
* It will not seek from stop with an MP3 (ogg is OK)
* the slider flicks back to the old value after a seek before continuing normally.
# 0.21 (3 Dec 2008)
Added a time slider to the player. This gives a visual readout of the relative position in the file.
# 0.20 (24 Nov 2008)
Added a popup (new browser window) version of the player which can pass data from the main site window to the player.
This is done via a shared cookie-based queue. The point is so users can move from page to page, click on several audio items, and for those to be added to the floating player window.
There are two axample of this.
Example 02 sends the id attribute from the audio link to player (for the player to handle in some way).
Example 03 sends the href (the link to the audio) to the player. The audio plays right away.
# 0.11 (20 Nov 2008)
A bunch of small improvements to ensure the plugin API is stable under all conditions, and a new parameter that can be used during the initialisation phase to not load flash (for people who want to stick to free software). Also implemented the new type attribute in the audio tag.
The player now drives the timer updates via events. I figure most people won't want to think about formatting times so the player now sends an event every 1 second for the formatted time. (this will eventually be configurable to allow 1/10 second resolution).
There were also changes to the way the player interacts with the audio element.
The code for updating the audio item time was moved to a function to allow us to be more specific about when it is called and also to help with moving to driving the udpates via events.
# 0.1
The initial release is fairly basic – you can give it an MP3 or Ogg file (in Firefox 3.1 which has built in Ogg Vorbis support) – and it will play it.
==================
CREDITS
==================
The player was inspired by MooSound. (We had to use jQuery.)
The flash player is mostly the same as the one used by MooSound with some changes.