OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef MEDIA_BASE_MEDIAPLAYER_OBSERVER_H_ |
| 6 #define MEDIA_BASE_MEDIAPLAYER_OBSERVER_H_ |
| 7 |
| 8 #include "base/callback.h" |
| 9 #include "media/base/audio_decoder_config.h" |
| 10 #include "media/base/cdm_context.h" |
| 11 #include "media/base/video_decoder_config.h" |
| 12 |
| 13 namespace media { |
| 14 |
| 15 // This class is an observer of media player events. |
| 16 class MEDIA_EXPORT MediaPlayerObserver { |
| 17 public: |
| 18 MediaPlayerObserver(); |
| 19 virtual ~MediaPlayerObserver(); |
| 20 |
| 21 // Called when the media element or its ancestor is entered/exited fullscreen. |
| 22 virtual void OnEnteredFullscreen() = 0; |
| 23 virtual void OnExitedFullscreen() = 0; |
| 24 |
| 25 // Called when CDM is attached to the media element. |
| 26 virtual void OnSetCdm(CdmContext* cdm_context) = 0; |
| 27 |
| 28 // Set video/audio config after demuxer is initialized. |
| 29 virtual void OnDecoderConfigChanged( |
| 30 const AudioDecoderConfig& audio_config, |
| 31 const VideoDecoderConfig& video_config) = 0; |
| 32 }; |
| 33 |
| 34 } // namespace media |
| 35 |
| 36 #endif // MEDIA_BASE_MEDIAPLAYER_OBSERVER_H_ |
OLD | NEW |