pl.mbdev.openstage
Class IppPlayer

java.lang.Object
  extended by pl.mbdev.openstage.Xml
      extended by pl.mbdev.openstage.XmlWithKey
          extended by pl.mbdev.openstage.IppPlayer

public class IppPlayer
extends XmlWithKey

Player is designed for applications that involve audio streaming. All commands are sent to the server on the fly, enabling it to react properly and stop/resume stream broadcast or receiving.

 Copyright 2011 Mateusz Bysiek,
     mb@mbdev.pl, http://mbdev.pl/
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at
 
     http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 

Author:
Mateusz Bysiek

Nested Class Summary
static class IppPlayer.Mode
          Defines possible modes of the IppPlayer.
static class IppPlayer.State
          Defines possible states of the IppPlayer.
 
Field Summary
private  IppPlayer.Mode mode
          Mode of the player, value from IppPlayer.Mode.
private  IppPlayer.State state
          State of the player, value from IppPlayer.State.
 
Constructor Summary
IppPlayer(java.lang.String url, IppPlayer.Mode mode, IppPlayer.State state, java.lang.String key, IppGauge gauge)
          Creates new player with all initial conditions available.
 
Method Summary
protected  java.lang.StringBuffer attributesToXmlString()
          Should be overridden by classes that have some attributes.
 
Methods inherited from class pl.mbdev.openstage.XmlWithKey
firstAttributesToXmlString
 
Methods inherited from class pl.mbdev.openstage.Xml
add, add, addAndReturn, attributeToXml, getContents, getLogicalRoot, getParent, getSubNode, getSubNodeIndex, getSubNodes, getXmlHeader, isEmpty, logicalAdd, sendTo, setContents, setParent, subObjectsCount, subObjectsToXmlString, toXmlString, wrapWithIppItem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mode

private final IppPlayer.Mode mode
Mode of the player, value from IppPlayer.Mode.


state

private final IppPlayer.State state
State of the player, value from IppPlayer.State.

Constructor Detail

IppPlayer

public IppPlayer(java.lang.String url,
                 IppPlayer.Mode mode,
                 IppPlayer.State state,
                 java.lang.String key,
                 IppGauge gauge)
Creates new player with all initial conditions available.

Parameters:
url - URL to which the actions inside the player are submitted
mode - Mode of the player, value from IppPlayer.Mode
state - State of the player, value from IppPlayer.State
key - key of the key-value pair sent to the server, when a button of the player is pressed
gauge - gauge that will be displayed above the player's buttons, and will show the progress of the playback/recording.
Method Detail

attributesToXmlString

protected java.lang.StringBuffer attributesToXmlString()
Description copied from class: Xml
Should be overridden by classes that have some attributes.

Overrides:
attributesToXmlString in class Xml
Returns:
XML-text containing all attributes of the object