WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
128684
Implement hasLiveStreamingContent property in WebAVPlayerController
https://bugs.webkit.org/show_bug.cgi?id=128684
Summary
Implement hasLiveStreamingContent property in WebAVPlayerController
Jeremy Jones
Reported
2014-02-12 13:31:24 PST
Implementing hasLiveStreamingContent will enable the live streaming UI.
Attachments
Patch
(17.49 KB, patch)
2014-03-21 12:54 PDT
,
Jeremy Jones
no flags
Details
Formatted Diff
Diff
Patch
(17.36 KB, patch)
2014-03-21 17:14 PDT
,
Jeremy Jones
simon.fraser
: review+
simon.fraser
: commit-queue-
Details
Formatted Diff
Diff
Patch
(18.19 KB, patch)
2014-03-26 12:09 PDT
,
Jeremy Jones
commit-queue
: commit-queue-
Details
Formatted Diff
Diff
Patch
(18.18 KB, patch)
2014-03-26 12:24 PDT
,
Jeremy Jones
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2014-03-18 14:26:23 PDT
<
rdar://problem/16358957
>
Jeremy Jones
Comment 2
2014-03-21 12:54:33 PDT
Created
attachment 227474
[details]
Patch
Jeremy Jones
Comment 3
2014-03-21 12:57:51 PDT
Simon, One question, in the IPC interface I convert a TimeRange to a Vector instead of creating an encoder/decoder for TimeRange. Would it be preferable to create the encoder/decoder?
Simon Fraser (smfr)
Comment 4
2014-03-21 13:31:12 PDT
Comment on
attachment 227474
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=227474&action=review
> Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.h:56 > + virtual void setSeekableRangesVector(Vector<std::pair<double, double>>);
Pass a reference unless you're using std::move.
> Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.h:70 > +
Blank space.
> Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm:71 > + for (auto range : ranges)
const auto&
> Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm:72 > + timeRanges->add(range.first, range.second);
You should add some basic validity checking here (check that range end is > range start, and any other invariants). Basically you should assume that data coming over IPC is unsafe.
> Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.h:73 > + virtual void setSeekableRanges(WebCore::TimeRanges&) override;
const WebCore::TimeRanges&
Jeremy Jones
Comment 5
2014-03-21 17:07:35 PDT
(In reply to
comment #4
)
> (From update of
attachment 227474
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=227474&action=review
> > > Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.h:56 > > + virtual void setSeekableRangesVector(Vector<std::pair<double, double>>); > > Pass a reference unless you're using std::move.
Passing Vector<> by reference is unprecedented in IPC interface, so I'll change the one call site to use std::move.
> > > Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.h:70 > > + > > Blank space.
Removed.
> > > Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm:71 > > + for (auto range : ranges) > > const auto&
Done.
> > > Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm:72 > > + timeRanges->add(range.first, range.second); > > You should add some basic validity checking here (check that range end is > range start, and any other invariants). Basically you should assume that data coming over IPC is unsafe.
Done
> > > Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.h:73 > > + virtual void setSeekableRanges
(WebCore::TimeRanges&) override;
> > const WebCore::TimeRanges&
Done.
Jeremy Jones
Comment 6
2014-03-21 17:14:22 PDT
Created
attachment 227512
[details]
Patch
Eric Carlson
Comment 7
2014-03-24 19:18:35 PDT
Comment on
attachment 227512
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=227512&action=review
This looks OK to me modulo my minor comments, but I am now a WK2 reviewer.
> Source/WebCore/platform/ios/WebVideoFullscreenModelMediaElement.mm:113 > + m_videoFullscreenInterface->setSeekableRanges(*m_mediaElement->seekable());
This is OK for now, but please add a FIXME and file a bug about coming up with a more efficient method of updating ranges than polling 3 times per second.
> Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm:79 > + setSeekableRanges(*timeRanges);
Could you pass the Vector<> directly instead of creating a temporary TimeRanges?
Eric Carlson
Comment 8
2014-03-24 19:20:11 PDT
(In reply to
comment #7
)
> (From update of
attachment 227512
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=227512&action=review
> > This looks OK to me modulo my minor comments, but I am now a WK2 reviewer. >
By which I meant I am *not* a WK2 reviewer, of course.
Simon Fraser (smfr)
Comment 9
2014-03-24 23:29:38 PDT
Comment on
attachment 227512
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=227512&action=review
> Source/WebCore/platform/ios/WebVideoFullscreenInterface.h:33 > +#import <WebCore/TimeRanges.h>
Don't include the header unless you need the implementation. Instead, forward-declare the class. Same with PlatformLayer.h if that's fixable. We have huge build time problems because of over-eager #includes.
> Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:365 > +void WebVideoFullscreenInterfaceAVKit::setSeekableRanges(const WebCore::TimeRanges& timeRanges)
Need the WebCore::?
> Source/WebCore/platform/ios/WebVideoFullscreenModelMediaElement.mm:112 > m_videoFullscreenInterface->setCurrentTime(m_mediaElement->currentTime(), [[NSProcessInfo processInfo] systemUptime]);
What is the [[NSProcessInfo processInfo] systemUptime] thing for? Weird.
> Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.h:56 > + virtual void setSeekableRangesVector(Vector<std::pair<double, double>>);
Vector&?
Jeremy Jones
Comment 10
2014-03-26 11:21:16 PDT
(In reply to
comment #7
)
> (From update of
attachment 227512
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=227512&action=review
> > This looks OK to me modulo my minor comments, but I am now a WK2 reviewer. > > > Source/WebCore/platform/ios/WebVideoFullscreenModelMediaElement.mm:113 > > + m_videoFullscreenInterface->setSeekableRanges(*m_mediaElement->seekable()); > > This is OK for now, but please add a FIXME and file a bug about coming up with a more efficient method of updating ranges than polling 3 times per second.
I added a change to use the progressEvent.
> > > Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm:79 > > + setSeekableRanges(*timeRanges); > > Could you pass the Vector<> directly instead of creating a temporary TimeRanges?
The is one of a couple solutions. 1) Create an encoder/decoder for TimeRanges to they can cross IPC boundary. Thus removing the vector. 2) Pass Vector<> directly, which will unnecessarily convert TimeRanges to a Vector<> in WK1. I wrote
https://bugs.webkit.org/show_bug.cgi?id=130784
to follow up on this.
Jeremy Jones
Comment 11
2014-03-26 11:33:00 PDT
(In reply to
comment #9
)
> (From update of
attachment 227512
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=227512&action=review
> > > Source/WebCore/platform/ios/WebVideoFullscreenInterface.h:33 > > +#import <WebCore/TimeRanges.h> > > Don't include the header unless you need the implementation. Instead, forward-declare the class. Same with PlatformLayer.h if that's fixable. > > We have huge build time problems because of over-eager #includes.
Removed include of TimeRanges.h and added it to the appropriate .m files. Removed include of PlatformLayer.h
> > > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:365 > > +void WebVideoFullscreenInterfaceAVKit::setSeekableRanges(const WebCore::TimeRanges& timeRanges) > > Need the WebCore::?
Removed.
> > > Source/WebCore/platform/ios/WebVideoFullscreenModelMediaElement.mm:112 > > m_videoFullscreenInterface->setCurrentTime(m_mediaElement->currentTime(), [[NSProcessInfo processInfo] systemUptime]); > > What is the [[NSProcessInfo processInfo] systemUptime] thing for? Weird.
It means, currentTime was X when systemUptime was Y. You can use this and the current rate to extrapolate the current time more accurately and continuously. Then you just periodically update this to minimize drift.
> > > Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.h:56 > > + virtual void setSeekableRangesVector(Vector<std::pair<double, double>>); > > Vector&?
Aha! The IPC interface can be declared without the reference, but this implementation can still use a reference because the call syntax is the same. Done.
Jeremy Jones
Comment 12
2014-03-26 12:06:58 PDT
(In reply to
comment #10
)
> (In reply to
comment #7
) > > (From update of
attachment 227512
[details]
[details]) > > View in context:
https://bugs.webkit.org/attachment.cgi?id=227512&action=review
> > > > This looks OK to me modulo my minor comments, but I am now a WK2 reviewer. > > > > > Source/WebCore/platform/ios/WebVideoFullscreenModelMediaElement.mm:113 > > > + m_videoFullscreenInterface->setSeekableRanges(*m_mediaElement->seekable()); > > > > This is OK for now, but please add a FIXME and file a bug about coming up with a more efficient method of updating ranges than polling 3 times per second. > > I added a change to use the progressEvent.
progressEvent isn't the correct event. I've added a FIXME, and filed
https://bugs.webkit.org/show_bug.cgi?id=130788
Jeremy Jones
Comment 13
2014-03-26 12:09:12 PDT
Created
attachment 227871
[details]
Patch
WebKit Commit Bot
Comment 14
2014-03-26 12:14:21 PDT
Comment on
attachment 227871
[details]
Patch Rejecting
attachment 227871
[details]
from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-02', 'validate-changelog', '--check-oops', '--non-interactive', 227871, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit ChangeLog entry in Source/WebCore/ChangeLog contains OOPS!. Full output:
http://webkit-queues.appspot.com/results/6248663194009600
Eric Carlson
Comment 15
2014-03-26 12:15:23 PDT
(In reply to
comment #12
)
> progressEvent isn't the correct event. I've added a FIXME, and filed
https://bugs.webkit.org/show_bug.cgi?id=130788
Thanks.
Jeremy Jones
Comment 16
2014-03-26 12:24:43 PDT
Created
attachment 227875
[details]
Patch
WebKit Commit Bot
Comment 17
2014-03-26 13:18:09 PDT
Comment on
attachment 227875
[details]
Patch Clearing flags on attachment: 227875 Committed
r166312
: <
http://trac.webkit.org/changeset/166312
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug