Closed Bug 928332 Opened 11 years ago Closed 11 years ago

[RTSP][Gaia] Support RTSP in Video apps.

Categories

(Firefox OS Graveyard :: Gaia::Video, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:1.3+, b2g-v1.3 fixed)

RESOLVED FIXED
1.3 Sprint 6 - 12/6
blocking-b2g 1.3+
Tracking Status
b2g-v1.3 --- fixed

People

(Reporter: kchang, Assigned: ethan)

References

Details

(Whiteboard: [FT:RIL])

Attachments

(1 file, 1 obsolete file)

Video apps need to handle the RTSP streaming.
Francis, who can help this bug?
blocking-b2g: --- → 1.3?
Flags: needinfo?(frlee)
hi David,

would you be able to help on this bug? or maybe redirect to your member?
Flags: needinfo?(frlee)
Francis,

You forgot to set the need info flag. Actually, I may help to finish RTSP in video app. But I still love to have the feedback from David. I also put Hema in cc list to let her know this thing.
Flags: needinfo?(dflanagan)
I don't know what RTSP is, so I can't provide any info.

I'm curious where this requirement is coming from. What's the user story about this?

I don't think we have planned for this for 1.3, so depending on how much work it is we may not be able to do this for 1.3
Flags: needinfo?(dflanagan)
I am also watching Gaia::Video and sorry for jumping in. Currently video app only handles storages/local files, it used to handle remote urls but removed months ago. Unless video app is going to support playing with urls again, like RTSP links, or I think currently video does not need to do anything about the RTSP streaming.
(In reply to David Flanagan [:djf] from comment #4)
> I'm curious where this requirement is coming from. What's the user story
> about this?
The user story is very simple, supporting RTSP in youtube.(bug 929372).
> I don't think we have planned for this for 1.3, so depending on how much
> work it is we may not be able to do this for 1.3
This feature is in 1.3 backlog.
According to comment 3, assign to John. If you think it isn't appropriate, please reassign to Nobody..:)
Assignee: nobody → johu
From Comment 5, we should not implement it until we have a concrete user story about it and decided is as product requirement, I think.
Vincent, can you please comment in order to let Gaia developer know the current status?
Sandip, Gaia developer needs concrete user story. Can you please provide?
Flags: needinfo?(vchang)
Flags: needinfo?(skamat)
Since bug 831645 is landed, we could support rtsp link with html5 video tag in b2g (Android ICS) right now. Below is an example. 

<video id=test controls preload=none width=300 height=300>
  <source src="rtsp://xxx.xxx.xxx.xxx/video.3gp"/>
</video>

To support rtsp in url bar(Bug 884702), our idea is to tell the video app that there is a Rtsp request from browser app, so that video app uses video tag and rtsp url to play rtsp streaming, make sense ?
Flags: needinfo?(vchang)
Agree with dominic.

To support this, we may need to modify the manifest to support rtsp protocol. As per comment 10, we already have similar mechanism for playing the video. The caller just calls "open" activity of video app to player the video. The activity message should contains:
data: {
  url: "rtsp://xxx.xxx.xxx.xxx/video.3gp",
  type: "mime-type, video/3gpp", (optional)
  title: "the title of video", (optional)
  filename: "if you want to save the file, give us a file name. this must have correct extension with mime type." (optional)
}


(In reply to Dominic Kuo [:dkuo] from comment #5)
> I am also watching Gaia::Video and sorry for jumping in. Currently video app
> only handles storages/local files, it used to handle remote urls but removed
> months ago. Unless video app is going to support playing with urls again,
> like RTSP links, or I think currently video does not need to do anything
> about the RTSP streaming.
(In reply to John Hu [:johnhu] from comment #11)
> Agree with dominic.
> 
> To support this, we may need to modify the manifest to support rtsp
> protocol. As per comment 10, we already have similar mechanism for playing
> the video. The caller just calls "open" activity of video app to player the
> video. The activity message should contains:
> data: {
>   url: "rtsp://xxx.xxx.xxx.xxx/video.3gp",
>   type: "mime-type, video/3gpp", (optional)
>   title: "the title of video", (optional)
>   filename: "if you want to save the file, give us a file name. this must
> have correct extension with mime type." (optional)
> }
Ethan, can you please have a try?
Flags: needinfo?(ettseng)
Hi John Hu and Ken,

Since we are sending RTSP request from gecko, we should not use activity message. Instead, we broadcast system messages with a special type "rtsp-open-video", which will be implemented in bug 884702. We will carry the RTSP link within the "url" property of the data object.
I already tried to modify the manifest of video app and successfully launched the video app with our broadcasted message. However, the video app could not play RTSP streaming video. It seems the media element did not fire the "onloadedmetadata" or "onloadeddata" event to the video app.
Flags: needinfo?(ettseng)
Depends on: 884702
No longer depends on: 831645
Summary: [RTSP][Gaia] Supprot RTSP in Video apps. → [RTSP][Gaia] Support RTSP in Video apps.
Blocks: 933234
reset to nobody because I am currently focused other higher priority bugs.
Assignee: johu → nobody
blocking-b2g: 1.3? → 1.3+
hi Hema,

could you please help to assign someone to help on this bug?
Flags: needinfo?(hkoka)
Francis,

Media Apps team has NO bandwidth to take on additional work for 1.3

Thanks
Hema
Flags: needinfo?(hkoka)
(In reply to Ken Chang from comment #9)
> Vincent, can you please comment in order to let Gaia developer know the
> current status?
> Sandip, Gaia developer needs concrete user story. Can you please provide?

Currently Waiting on partners to clarify what they need via partner management.
Flags: needinfo?(skamat)
(In reply to Ethan Tseng [:ethan] from comment #13)
> ... However, the video app
> could not play RTSP streaming video. It seems the media element did not fire
> the "onloadedmetadata" or "onloadeddata" event to the video app.

Update the current status.
John Hu and I are working in progress and we further verified that "onloadedmetadata" and "onloadeddata" events are actually fired from media element to video app. We didn't notice them.
Although not so smoothly, we can successfully play RTSP video in an <a href> link right now.
Thanks for the update Ethan.
Looks like we are having positive progress so I'm setting target milestone to sprint6.
Let me know if it's inappropriate.
Target Milestone: --- → 1.3 Sprint 6 - 12/6
Actually, it fires when we press "play" button. That's not as expected. It should load metadata when we set the url like local file and other streaming format.
(In reply to John Hu [:johnhu] from comment #20)
> Actually, it fires when we press "play" button. That's not as expected. It
> should load metadata when we set the url like local file and other streaming
> format.

Maybe you can try to set "preload=metadata" to the video tag, not sure if it helps.
It already had this attribute. That's why I feel the behavior is not as expected as others. Thanks for this, anyway.
Whiteboard: [FT:RIL]
Hi George, bug 884702 was landed.
The message type and format are as followed.

Message type: "rtsp-open-video"
Message content
data: {
  url: "rtsp://some-url-to-rtsp",
  title: "rtsp://some-url-to-rtsp",
  type: "video/rtsp"
}

There are only 3 properties in this message.
The MIME type is a fake one. I don't know whether it concerns you or not.
Synched up with John Hu, George in Taipei gaia team is helping with this bug.
Assignee: nobody → gduan
RTSP is not a committed feature for 1.3 - it's targeted. This should not block the release.
blocking-b2g: 1.3+ → 1.3?
George, I wonder if your patch is ready for review? Since you don't add a reviewer.
Flags: needinfo?(gduan)
Hi Ken,

I haven't tested the function yet since it requires bug 938512 to be ready.

Hi Ethen,

is there any way for me to test it now?
Flags: needinfo?(gduan) → needinfo?(ettseng)
(In reply to George Duan [:gduan] from comment #28)
> Hi Ken,
> I haven't tested the function yet since it requires bug 938512 to be ready.
> Hi Ethen,
> is there any way for me to test it now?
You can still test it without bug 938512. Pressing "play" button will fire the loadedmetadata event.
Flags: needinfo?(ettseng)
Ethan,

We can do the test and review, but I prefer to land the code until bug 938512 landed.
(In reply to John Hu [:johnhu] from comment #30)
> Ethan,
> We can do the test and review, but I prefer to land the code until bug
> 938512 landed.
Sure. Bug 938512 is in review and I think will be landed soon.
Using a system message (rtsp-open-video) is not what we should have done here. Is there any reason to not fire an activity instead? What will happen once another app declares that it supports the rtsp-open-video system message?

Until this is solved I'm vetoing landing that on 1.3.
Fabrice,

I prefer to use activity, too. But as per comment 13, Ethan said we should not use activity to do so. And that system message (rtsp-open-video) had already landed to gecko with bug 884702. This is the corresponding gaia bug.
Sorry, there is a typo here:

I prefer *not* to land the code until bug 938512 landed.

(In reply to John Hu [:johnhu] from comment #30)
> Ethan,
> 
> We can do the test and review, but I prefer to land the code until bug
> 938512 landed.
(In reply to Fabrice Desré [:fabrice] from comment #32)
> Using a system message (rtsp-open-video) is not what we should have done
> here. Is there any reason to not fire an activity instead? What will happen
> once another app declares that it supports the rtsp-open-video system
> message?

Activity would still have the same issue. Right? Arbitrary apps can claim to be able to receive an activity with a specific activity.name (rtsp-open-video).

Using the system message makes much sense to me than activity. As you know:

  - Activity:       app -> platform -> app
  - System message: platform -> app

If the platform wants to notify Gaia about something, it is obvious to fire the system message. Hacking to send an activity without the request from Gaia (i.e., new MozActivity()) is problematic: what would happen if the subscriber runs the activity's callback? There is no corresponding publisher handling the result.

Does that sound reasonable?
Hi Fabrice,
How do you think about Gene's comment?
Flags: needinfo?(fabrice.desre)
Flags: needinfo?(fabrice.desre) → needinfo?(fabrice)
If you use a system message like you do, it is broadcasted to all apps declaring this message. This means that all these apps will be launched and will try to load the stream. That makes no sense at all. Also, gaia is not moving apps to the foreground when they get a system message. 

On the other hand, using an activity means that the user get the opportunity to decide which app will play the stream (he will choose GeneWonderfulPlayer for sure!), and only this app will get the stream url. The callback is a non-issue: nothing prevents the video app to send back a result, it will just be ignored by the platform. We did that for the youtube handler, and are still using that for mime-type based handler, and this works fine.

Comment #13 only says "we will use system messages" but gives no justification. I think this was a mistake and should have never landed.
Flags: needinfo?(fabrice)
This is not a committed feature for 1.3, hence not blocking it. 

Also NI'd Sri for product input on this bug (as I just heard during the triage that we dont need to do anything on video for RTSP)
blocking-b2g: 1.3? → ---
Flags: needinfo?(skasetti)
The open activity already supports streaming source. If gecko can use activity to call video app, we don't need to do anything to support RTSP because it already does.
(In reply to Fabrice Desré [:fabrice] from comment #37)
> Comment #13 only says "we will use system messages" but gives no
> justification. I think this was a mistake and should have never landed.

Hi Fabrice,
Thanks for your clear explanation. I will fix this problem as soon as possible.
Blocks: 877065
Assignee: gduan → ettseng
Depends on: 947132
Attached file PR to master
Add type "video/rtsp" for "view" activity of video app.
Attachment #8339897 - Attachment is obsolete: true
Attachment #8344630 - Flags: review?(johu)
Comment on attachment 8344630 [details] [review]
PR to master

Thanks for this patch. I am happy to see RTSP to use activity to open video app because we already have the codes to handle streaming content.
Attachment #8344630 - Flags: review?(johu) → review+
merged to master:
https://github.com/mozilla-b2g/gaia/commit/ff703bf2c0baaf06b2b74144bec9b9cc99f22404
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
blocking-b2g: --- → 1.3?
(In reply to Hema Koka [:hema] from comment #38)
> This is not a committed feature for 1.3, hence not blocking it. 
> 
> Also NI'd Sri for product input on this bug (as I just heard during the
> triage that we dont need to do anything on video for RTSP)

See this comment above. This is not a blocker for the same reasons already cited in this comment.
blocking-b2g: 1.3? → -
(In reply to Jason Smith [:jsmith] from comment #44)
> (In reply to Hema Koka [:hema] from comment #38)
> > This is not a committed feature for 1.3, hence not blocking it. 
> > 
> > Also NI'd Sri for product input on this bug (as I just heard during the
> > triage that we dont need to do anything on video for RTSP)
> 
> See this comment above. This is not a blocker for the same reasons already
> cited in this comment.

We are being requested to land RTSP in 1.3 for BD purpose.
Also requesting approval to uplift.
blocking-b2g: - → 1.3+
Flags: needinfo?(fabrice)
I'm fine with uplifting that to 1.3 because it's a trivial patch.

In general, if BD absolutely needs something in a release, they must first get that to be a committed feature.
Flags: needinfo?(fabrice)
Flags: needinfo?(skasetti)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: