Closed MahmoudMabrok closed 6 months ago
Sure, we could add that. What would be the benefit over the current functions based on id? My only concern is polluting the API too much, with nearly duplicated functions.
My current app and most of apps I dealt with, we had the links of videos as full url not as id only, so every user to lib will create that util and add unit tests to it
So I thought to have it, it is like time utils
Oh, sorry.
It should be a separate util not as extension to YouTube player as I shared.
LinksUtil.getIDFromUrl.
Makes sense, feel free to send a pull request :) I think it should probably be in the form of new functions or extension functions.
@PierfrancescoSoffritti I did the PR and added Unit tests for it, please check it.
I am closing it, as you see it is not needed.
If anyone need it, will be on my fork.
Feature Request
Describe your idea
a util function to extract video id from url
Expected behavior and realization
playerView.loadFromUrl(url, startTime)