• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

OSMF with HTTP stream seeking is resetting start index...

Enthusiast ,
Aug 23, 2012 Aug 23, 2012

Copy link to clipboard

Copied

Hi,

I have built an OSMF player that allows users to seek to where they were when resuming, but also to scrub back to the beginning.

EG:

A stream is 1 minute long.

User starts play at 25 seconds.

User can scrub back to 5 seconds or forward to 55 seconds.

This works perfectly with RTMP - TimeTrait reports correctly and video displays correctly.

EG:

Start at 25 seconds, TimeTrait reports: duration = 60, current position = 25 and displaying video is 25.

Seek to 5 seconds rewinds to current duration = 60, position = 5, displaying video is 5.

But...

With HTTP streams...

Start at 25 seconds. TimeTrait reports: duration = 60, current position = 25 and displaying video is 50.

Seek to 5 seconds rewinds to before the start of the stream and gives me a media complete... end of stream.

Start at 30 seconds, TimeTrait reports duration = 60, current position = 30 and displaying video is 60 so gives me a media complete... end of stream.

It is pretty clear that what is happening is that HTTP stream seeking is resetting my start index to the seek point, as if I had started play with:

NetStream.play(seekPoint);

Rather than:

NetStream.play();

NetStream.seek(seekPoint);

This, I hasten to add, is a horrendous issue from my client's point of view as it effectively means I cannot allow resume of content.

Does anybody have any ideas, workarounds?

G

Views

3.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Mar 25, 2013 Mar 25, 2013

After digging into OSMF code i've found a SOLUTION:

First, ensure that you have the latest OSMF source inside your project.

For now it's 2.0.71 (org.osmf.utils.Version).

Navigate to org.osmf.net.httpstreaming.HTTPNetStream

and make some changes:

1. Change line # 1441

_initialTime = _dvrInfo != null ? _dvrInfo.startTime : currentTime;

to

_initialTime = _dvrInfo != null ? _dvrInfo.startTime : (_seekTime > 0 ? _playStart : currentTime);

2. Change line # 1496

_initialTime = currentTime

to

_initialTime = _seekTi
...

Votes

Translate

Translate
Community Beginner ,
Mar 25, 2013 Mar 25, 2013

Copy link to clipboard

Copied

After digging into OSMF code i've found a SOLUTION:

First, ensure that you have the latest OSMF source inside your project.

For now it's 2.0.71 (org.osmf.utils.Version).

Navigate to org.osmf.net.httpstreaming.HTTPNetStream

and make some changes:

1. Change line # 1441

_initialTime = _dvrInfo != null ? _dvrInfo.startTime : currentTime;

to

_initialTime = _dvrInfo != null ? _dvrInfo.startTime : (_seekTime > 0 ? _playStart : currentTime);

2. Change line # 1496

_initialTime = currentTime

to

_initialTime = _seekTime > 0 ? _playStart : currentTime

That's it!

Now you can listen to MediaPlayerCapabilityChangeEvent.CAN_SEEK_CHANGE event

and seek immediately.

By the way: if you'll find any bugs related to this change feel free to post them here!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Mar 25, 2013 Mar 25, 2013

Copy link to clipboard

Copied

Thanks, ignatev_me

G

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 26, 2013 Mar 26, 2013

Copy link to clipboard

Copied

Just downloaded the latest sources from opensourcemediaframework.com - made the changes in org.osmf.net.httpstreaming.HTTPNetStream in lines #1399 and #1454 and it worked. Great!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 12, 2013 Apr 12, 2013

Copy link to clipboard

Copied

Works for me, too.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 11, 2013 Jul 11, 2013

Copy link to clipboard

Copied

Works for me three!!! Thanks dude!

Made my day.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 31, 2013 Oct 31, 2013

Copy link to clipboard

Copied

Hi all,

opensourcemediaframework.com is now gone and it looks like Adobe is gone in regards to OSMF as well. http://www.osmf.org is dead also, so so much for Open Source I guess. Too bad I trusted Adobe and too bad for my client that built a business model based on Adobe technology 😕

Anyone knows where I can find source code from versions beyone 2.0? Like the 2.0.71 version mentioned above in this thread?

Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 31, 2013 Oct 31, 2013

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 31, 2013 Oct 31, 2013

Copy link to clipboard

Copied

Sure, but did you look at that site? Tons of dead links and the SourceForge repo was last updated for the 2.0 launch almost 1.5 years ago. In other words - not a single bug fix in two years?

I've found a couple Github repositories that seem to have taken over where Adobe dropped the ball though. Will try my luck there.

J

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 23, 2014 Sep 23, 2014

Copy link to clipboard

Copied

Hi,

I have changed as mention above in HttpNetStream.as class but still it is not working. Can you please advise how it is working at your end?

Best regards,

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Sep 30, 2014 Sep 30, 2014

Copy link to clipboard

Copied

Hi,

Workflow is this;

1. Set up the OSMF project as a separate,shared coding library.

2. Delete the reference to the OSMF .swc that is used by default when you select an SDK.

3. Use the OSMF project as a project dependency

4. You should now be using the library you downloaded in place of the SWC from the SDK and you should be able to stop on break points etc.

G

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 06, 2014 Oct 06, 2014

Copy link to clipboard

Copied

Hi,

Thanks a lot for your kind support. I have tried that but I can't see that HttpNetStream.as class not executing.

Can you please advise why HttpNetStream.as class not working? Do I need to extends it? If yes, then please advise me how to extends this class.

Best regards,

Sunil Kumar

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 20, 2014 Nov 20, 2014

Copy link to clipboard

Copied

LATEST

Sorry for delay, no, don't extend - OSMF won't see extended class as the classes in use are referenced explicitly in the code.

The most probable issue is that you are using the pre-compiled OSMF library and not your imported library.

G

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines