This object allows you to play media files.
Constructor function.
var myObject = new MediaPlaylist();
Sets the playback rate.
myObject.setPlaybackRate(rate);
Sets the volume.
myObject.setVolume(volume);
Sets the position of the current playing item.
myObject.setPosition(position);
Mutes or unmutes the current playing media.
myObject.setMuted(muted);
Returns the duration of the current media.
myObject.duration();
Returns true if the current media has audio.
myObject.hasAudio();
Returns true if the current media has video.
myObject.hasVideo();
Returns the current playback rate.
myObject.playbackRate();
Returns the current volume.
myObject.volume();
Returns the current position.
myObject.position();
Returns true if the current media is muted.
myObject.isMuted();
Returns true if the current media is seekable. Seekable means that you can seek to a specific position to play.
myObject.isSeekable();
Returns the percentage of filled buffer.
myObject.bufferStatus();
Begins playing the playlist.
myObject.play();
Pauses the playing.
myObject.pause();
Stops the playing.
myObject.stop();
Adds a local media to the playlist.
myObject.addLocalMedia(path);
Adds a distant media to the playlist.
myObject.addDistantMedia(url);
Inserts a local media to the playlist.
myObject.insertLocalMedia(position, path);
Inserts a distant media to the playlist.
myObject.insertDistantMedia(position, path);
Clears the playlist contents.
myObject.clear();
Plays the next playlist item.
myObject.next();
Plays the previous playlist item.
myObject.previous();
Sets the current media to play.
myObject.setCurrentMedia(mediaIndex);
Shuffles randomly the playlist.
myObject.shuffle();
Sets the playback mode.
myObject.setPlaybackMode(playbackMode);
Removes a media from the list.
myObject.removeMedia(mediaIndex);
Returns the current playing media index.
myObject.currentMedia();
Returns true if the playlist is empty.
myObject.isEmpty();
Returns the playlist size.
myObject.mediaCount();
Returns the next media index.
myObject.nextMedia();
Returns the previous media index.
myObject.previousMedia();
Returns the playback mode.
myObject.playbackMode();
The playback rate. (float)
The volume. (float)
The position in milliseconds. (integer)
If the media is muted. (boolean)
The current media index. (integer)
The playback mode. (PlaybackMode)
The playback mode.