/* * Copyright (C) 2007 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef MediaPlayer_h #define MediaPlayer_h #if ENABLE(VIDEO) #if ENABLE(PLUGIN_PROXY_FOR_VIDEO) #include "MediaPlayerProxy.h" #endif #include "IntRect.h" #include "StringHash.h" #include #include #include namespace WebCore { class ContentType; class FrameView; class GraphicsContext; class IntRect; class IntSize; class MediaPlayer; class MediaPlayerPrivateInterface; class String; #if USE(ACCELERATED_COMPOSITING) class GraphicsLayer; #endif class MediaPlayerClient { public: virtual ~MediaPlayerClient() { } // the network state has changed virtual void mediaPlayerNetworkStateChanged(MediaPlayer*) { } // the ready state has changed virtual void mediaPlayerReadyStateChanged(MediaPlayer*) { } // the volume or muted state has changed virtual void mediaPlayerVolumeChanged(MediaPlayer*) { } // time has jumped, eg. not as a result of normal playback virtual void mediaPlayerTimeChanged(MediaPlayer*) { } // the media file duration has changed, or is now known virtual void mediaPlayerDurationChanged(MediaPlayer*) { } // the playback rate has changed virtual void mediaPlayerRateChanged(MediaPlayer*) { } // The MediaPlayer has found potentially problematic media content. // This is used internally to trigger swapping from a