Changeset 166250 in webkit
- Timestamp:
- Mar 25, 2014 2:00:19 PM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r166249 r166250 1 2014-03-25 Brent Fulgham <bfulgham@apple.com> 2 3 [iOS] Pass additional options to AVFoundation during playback. 4 https://bugs.webkit.org/show_bug.cgi?id=130624 5 6 Reviewed by Eric Carlson. 7 8 * html/HTMLMediaElement.cpp: 9 (WebCore::HTMLMediaElement::doesHaveAttribute): Return attribute value if the user 10 passes a pointer to fill in. 11 * html/HTMLMediaElement.h: 12 * platform/graphics/MediaPlayer.cpp: 13 (WebCore::MediaPlayer::doesHaveAttribute): 14 * platform/graphics/MediaPlayer.h: 15 (WebCore::MediaPlayerClient::doesHaveAttribute): 16 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: 17 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Pass additional 18 option if supplied by user. 19 1 20 2014-03-25 Michael Saboff <msaboff@apple.com> 2 21 -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r166247 r166250 6043 6043 } 6044 6044 6045 bool HTMLMediaElement::doesHaveAttribute(const AtomicString& attribute ) const6045 bool HTMLMediaElement::doesHaveAttribute(const AtomicString& attribute, AtomicString* value) const 6046 6046 { 6047 6047 QualifiedName attributeName(nullAtom, attribute, nullAtom); 6048 if (!fastHasAttribute(attributeName)) 6048 6049 AtomicString elementValue = fastGetAttribute(attributeName); 6050 if (elementValue.isNull()) 6049 6051 return false; 6050 6052 6051 6053 if (Settings* settings = document().settings()) { 6052 if (attributeName == HTMLNames::x_itunes_inherit_uri_query_componentAttr) 6053 return settings->enableInheritURIQueryComponent(); 6054 } 6054 if (attributeName == HTMLNames::x_itunes_inherit_uri_query_componentAttr && !settings->enableInheritURIQueryComponent()) 6055 return false; 6056 } 6057 6058 if (value) 6059 *value = elementValue; 6055 6060 6056 6061 return true; -
trunk/Source/WebCore/html/HTMLMediaElement.h
r166247 r166250 130 130 virtual bool supportsScanning() const override; 131 131 132 virtual bool doesHaveAttribute(const AtomicString& ) const override;132 virtual bool doesHaveAttribute(const AtomicString&, AtomicString* value = nullptr) const override; 133 133 134 134 PlatformMedia platformMedia() const; -
trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp
r165928 r166250 1413 1413 } 1414 1414 1415 bool MediaPlayer::doesHaveAttribute(const AtomicString& attribute ) const1415 bool MediaPlayer::doesHaveAttribute(const AtomicString& attribute, AtomicString* value) const 1416 1416 { 1417 1417 if (!m_mediaPlayerClient) 1418 1418 return false; 1419 1419 1420 return m_mediaPlayerClient->doesHaveAttribute(attribute );1421 } 1422 1423 } 1424 1425 #endif 1420 return m_mediaPlayerClient->doesHaveAttribute(attribute, value); 1421 } 1422 1423 } 1424 1425 #endif -
trunk/Source/WebCore/platform/graphics/MediaPlayer.h
r165928 r166250 249 249 virtual IntRect mediaPlayerWindowClipRect() { return IntRect(); } 250 250 virtual CachedResourceLoader* mediaPlayerCachedResourceLoader() { return 0; } 251 virtual bool doesHaveAttribute(const AtomicString& ) const { return false; }251 virtual bool doesHaveAttribute(const AtomicString&, AtomicString* = 0) const { return false; } 252 252 253 253 #if ENABLE(VIDEO_TRACK) … … 301 301 bool supportsScanning() const; 302 302 bool requiresImmediateCompositing() const; 303 bool doesHaveAttribute(const AtomicString& ) const;303 bool doesHaveAttribute(const AtomicString&, AtomicString* value = nullptr) const; 304 304 PlatformMedia platformMedia() const; 305 305 PlatformLayer* platformLayer() const; -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
r165998 r166250 91 91 #endif 92 92 93 #if PLATFORM(IOS) 94 @class AVPlayerItem; 95 @interface AVPlayerItem (WebKitExtensions) 96 @property (nonatomic, copy) NSString* dataYouTubeID; 97 @end 98 #endif 99 93 100 SOFT_LINK_FRAMEWORK_OPTIONAL(AVFoundation) 94 101 SOFT_LINK_FRAMEWORK_OPTIONAL(CoreMedia) … … 703 710 [m_avPlayer.get() replaceCurrentItemWithPlayerItem:m_avPlayerItem.get()]; 704 711 712 #if PLATFORM(IOS) 713 AtomicString value; 714 if (player()->doesHaveAttribute("data-youtube-id", &value)) { 715 [m_avPlayerItem.get() setDataYouTubeID: value]; 716 #endif 717 705 718 #if HAVE(AVFOUNDATION_MEDIA_SELECTION_GROUP) && HAVE(AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT) 706 719 const NSTimeInterval legibleOutputAdvanceInterval = 2;
Note: See TracChangeset
for help on using the changeset viewer.