You can see an example of the platform agnostic embedded video in use at https://www.tubeshift.info/extension/ and with a slightly different integration at api.tubeshift.info/1/embed/youtube/YxyW_mttnQ0 which is supposed to be suitable for direct use inside of an iframe.
I'm working on implementing a public JavaScript API for finding a specific video from different video websites as a part of the TubeShift browser extension and project. The API is currently used by the browser extension and the website at www.tubeshift.info and I think it might be handy for other people.
This is the first time I've tried to create a JavaScript API so I'm looking for feedback on how usable it is and how bad my accent may be. I also don't have a lot of experience with Promises and I built the API specifically to be fault tolerant. This code is also fairly knew but is working in testing so far.
The API implementation supports either querying the TubeShift web service for information about locations for a video or it can optionally querying Odysee and BitChute directly to find out if a specific YouTube video is being hosted there. Because of CORS the discovery does not work on a normal web page but it does function inside the TubeShift browser extension.
My goal with the API rewrite from the version currently used by the production version of the extension was to allow the extension to function usefully even if the TubeShift API web service is offline. This makes TubeShift function like the Watch on LBRY or Watch on Odysee browser extensions but still offers more features even when the webservice is not available.
I'm not a web developer either and tubeshift.info is the first "real" website I've ever built and definitely the most I've ever done with DOM. The experience has been really interesting.
I really focused on fault tolerance so that the API could be used for critical user experiences even though the web service it talks to is not always available. For the use case of the TubeShift extension the tolerance for service outages on the webservice are much longer than something like having an embedded video on a website. The website implementation itself was built so that even if the web service is offline or the JavaScript faults internally that the user still receives an acceptable though not premium experience. That has been a really fun challenge to think about.
I hope the idea is interesting for others and I'm happy to answer questions.
I'm working on implementing a public JavaScript API for finding a specific video from different video websites as a part of the TubeShift browser extension and project. The API is currently used by the browser extension and the website at www.tubeshift.info and I think it might be handy for other people.
This is the first time I've tried to create a JavaScript API so I'm looking for feedback on how usable it is and how bad my accent may be. I also don't have a lot of experience with Promises and I built the API specifically to be fault tolerant. This code is also fairly knew but is working in testing so far.
The API implementation supports either querying the TubeShift web service for information about locations for a video or it can optionally querying Odysee and BitChute directly to find out if a specific YouTube video is being hosted there. Because of CORS the discovery does not work on a normal web page but it does function inside the TubeShift browser extension.
My goal with the API rewrite from the version currently used by the production version of the extension was to allow the extension to function usefully even if the TubeShift API web service is offline. This makes TubeShift function like the Watch on LBRY or Watch on Odysee browser extensions but still offers more features even when the webservice is not available.
I'm not a web developer either and tubeshift.info is the first "real" website I've ever built and definitely the most I've ever done with DOM. The experience has been really interesting.
I really focused on fault tolerance so that the API could be used for critical user experiences even though the web service it talks to is not always available. For the use case of the TubeShift extension the tolerance for service outages on the webservice are much longer than something like having an embedded video on a website. The website implementation itself was built so that even if the web service is offline or the JavaScript faults internally that the user still receives an acceptable though not premium experience. That has been a really fun challenge to think about.
I hope the idea is interesting for others and I'm happy to answer questions.