Newpipe: [Feature Request] Share URL with option to add starting time

Created on 11 Jan 2019  路  9Comments  路  Source: TeamNewPipe/NewPipe

Youtube website provides an option to share a video starting at some point in the video.

seleccion_743

Youtube Android app does not provide that feature either.

Would be possible to add that feature to NewPipe?

Most helpful comment

Can we also get the ability to open such links at their specified time? These features together would be awesome.

All 9 comments

Can we also get the ability to open such links at their specified time? These features together would be awesome.

Also, clicking on timestamps in the discription!

I think it would be useful to provide a share option which as available from a playing video then.

I'm implementing this. I added a share button inside the main player, in the "more options" section. When clicking on it, the sharing dialog is opened with the URL of the video starting at the current time. That URL that always contains &t=SECONDS at the end (where SECONDS is the current playback seek, obviously). There is no way to manually change (or unset) the video starting time.
Even though this is a limitation, I don't think it is a good idea to show a dialog that lets users choose, because most of the times the video starting time they need is the current one. On the other hand I think it would be a great idea to add an option to the settings that makes it so that video starting time is never added.
NewPipe share
The share button generates this text (for the video above at the current time):

TEST VIDEO
https://www.youtube.com/watch?v=C0DPdy98e4c&t=3

Please give me some feedback :-).

@Gymcap I think that has already been implemented (tested on 0.16.1)

That's good to hear :+1:
I think we should not add too much settings and there are enough possibilities to share a video without a timestamp (e.g. from the video detail page or the playlist menu). In other words, I'd vote to not introduce an extra setting.
CC @theScrabi What's your opinion?

inside fragment.BaseStateFragment there are these two protected functions: shareUrl and shareUrlInBrowser. But I don't think they have anything to do with a StateFragment (all the other functions in that class are related to loading the fragment content with error handling). Shall I move them to a separate class in the utils folder (e.g. utils.ShareUtils), so that I can use them from anywhere in the app? Since player.MainVideoPlayer doesn't have BaseStateFragment as a base class (and neither do any of its members, afaik), I had to duplicate the code for sharing. Moving the functions to utils would solve the problem and make the code more elegant.

The method would become something like this:

public static void shareUrl(Context context, String subject, String url) { /* code */ }

@TobiGr @theScrabi

I think this can now be closed since the changes have been merged

Was this page helpful?
0 / 5 - 0 ratings