Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getUnixTimeMs(): Returns Only Default Value #876

Open
2 tasks done
marco-studer-srf opened this issue Jan 24, 2025 · 2 comments
Open
2 tasks done

getUnixTimeMs(): Returns Only Default Value #876

marco-studer-srf opened this issue Jan 24, 2025 · 2 comments
Labels
question Further information is requested triage Requires triage first

Comments

@marco-studer-srf
Copy link

marco-studer-srf commented Jan 24, 2025

Can your answer be found elsewhere?

  • I have searched existing issues and found no similar question.

  • I have browsed the available documentation and found no answer to my question.

Detailed question

Pillarbox 4.0.0 ships the method mentioned in the title. Is it correct, that this would allow us to get the exact time of a live stream based on its position?

When I call getUnixTimeMs(), I always get the default value C.TIME_UNSET, implying that either the timeline is empty or the window start time is unset.

How do I correctly set the timeline or the window start time?

@marco-studer-srf marco-studer-srf added question Further information is requested triage Requires triage first labels Jan 24, 2025
@github-project-automation github-project-automation bot moved this to ✏️ Draft in Pillarbox Jan 24, 2025
@StaehliJ
Copy link
Contributor

This feature works only with stream that have timestamps in it's stream. So if you never have something beside C.TIME_UNSET, this mean probably your stream doesn't have them. Can you tell us which stream you are testing it?

@marco-studer-srf
Copy link
Author

marco-studer-srf commented Jan 24, 2025

I am testing with

Live(
   urn=urn:srf:audio:ee1fb348-2b6a-4958-9aac-ec6c87e190da,
   title=MediaTitle(value=Radio SRF 4 News),
   imageUrl=https://il.srgssr.ch/integrationlayer/2.0/image-scale-sixteen-to-nine/https://play-pac-public-production.s3.eu-central-1.amazonaws.com/images/4dcc8d08-93b0-4b1b-bfe1-62a4e473b82d.jpeg
)

We are setting the media items like this:

player.setMediaItems(
    media.resources.map {
        SRGMediaItem(it.urn.toString()) {
            host(environment.toIlHost())
        }
    },
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested triage Requires triage first
Projects
Status: ✏️ Draft
Development

No branches or pull requests

2 participants