Loop videos on iOS and Android (assuming only one video like on YouTube)

Overview

Mobile Video Loop

By: Andrew-Chen-Wang

iOS Safari Extension (soon Android) that lets you loop a video on your current website. This only works for the first video that appears in the website.

I just didn't want to download the YouTube app which contains ads. Perfect combination for any situation: AdBlock + PiPifier (once enabled, you can play in background since it's in PiP mode) + Mobile Video Loop.

What This Does

demo.mp4

I just want to make 2 things:

  1. If there is only one video tag, loop it by adding loop attribute to the video tag
  2. If there are multiple, then open a popup that loads the thumbnails of all the videos and have user select which video they want looped.

If you press the button again:

  1. Simply disable loop
  2. Show which videos to disable loop or enable loop

License

This repository's code is licensed under Apache 2.0

Comments
  • Simple loop

    Simple loop

    Some people may prefer to loop the entire video and not want to press so many buttons.

    I just can't figure out how to make that happen since I don't understand how I can transfer data from Swift to the JS.

    I tried implementing a Swift protocol that would receive messages, but the protocol doesn't even work since the import SafariService doesn't import a bunch of its API... We'll see

    enhancement 
    opened by Andrew-Chen-Wang 3
  • Enable loop from specific times

    Enable loop from specific times

    It's possible to detect end of video and loop from there: https://stackoverflow.com/questions/21271706/detect-in-javascript-when-html5-video-loop-restarts

    Then we'd need to figure out a UI (maybe an alert in JS that asks for input?) to accept input... Then we'd need to figure out how to detect current time in video? I think that's possible, and we can do a while loop for every 100 milliseconds to stop video and replay at specific time.

    enhancement 
    opened by Andrew-Chen-Wang 1
  • [ImgBot] Optimize images

    [ImgBot] Optimize images

    Beep boop. Your images are optimized!

    Your image file size has been reduced by 29% πŸŽ‰

    Details

    | File | Before | After | Percent reduction | |:--|:--|:--|:--| | /ios/Mobile Video Loop Extension/Resources/images/toolbar-icon-64.png | 2.48kb | 1.44kb | 41.96% | | /ios/Mobile Video Loop Extension/Resources/images/toolbar-icon-48.png | 1.87kb | 1.16kb | 37.76% | | /ios/Mobile Video Loop Extension/Resources/images/icon-512.png | 29.07kb | 18.83kb | 35.20% | | /ios/Mobile Video Loop Extension/Resources/images/toolbar-icon-40.png | 1.53kb | 1.01kb | 33.91% | | /ios/Mobile Video Loop Extension/Resources/images/icon-256.png | 12.57kb | 8.87kb | 29.44% | | /ios/Mobile Video Loop Extension/Resources/images/icon-64.png | 2.70kb | 2.02kb | 25.20% | | /ios/Mobile Video Loop Extension/Resources/images/toolbar-icon-32.png | 1.18kb | 0.90kb | 24.28% | | /ios/Mobile Video Loop Extension/Resources/images/icon-128.png | 5.65kb | 4.53kb | 19.80% | | /ios/Mobile Video Loop Extension/Resources/images/icon-48.png | 2.03kb | 1.67kb | 18.11% | | /ios/Mobile Video Loop Extension/Resources/images/icon-100.png | 4.36kb | 3.60kb | 17.61% | | /ios/Mobile Video Loop Extension/Resources/images/icon-88.png | 3.77kb | 3.28kb | 12.97% | | /ios/Mobile Video Loop Extension/Resources/images/toolbar-icon-20.png | 0.78kb | 0.72kb | 7.89% | | | | | | | Total : | 68.00kb | 48.03kb | 29.37% |


    πŸ“ docs | :octocat: repo | πŸ™‹πŸΎ issues | πŸͺ marketplace

    ~Imgbot - Part of Optimole family

    enhancement 
    opened by imgbot[bot] 0
  • [ImgBot] Optimize images

    [ImgBot] Optimize images

    Beep boop. Your images are optimized!

    Your image file size has been reduced by 35% πŸŽ‰

    Details

    | File | Before | After | Percent reduction | |:--|:--|:--|:--| | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/1024.png | 44.68kb | 10.25kb | 77.07% | | /ios/Mobile Video Loop Extension/Resources/images/toolbar-icon-64.png | 2.48kb | 1.44kb | 41.96% | | /ios/Mobile Video Loop Extension/Resources/images/toolbar-icon-48.png | 1.87kb | 1.16kb | 37.76% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/512.png | 29.07kb | 18.83kb | 35.20% | | /ios/Mobile Video Loop Extension/Resources/images/icon-512.png | 29.07kb | 18.83kb | 35.20% | | /ios/Mobile Video Loop Extension/Resources/images/toolbar-icon-40.png | 1.53kb | 1.01kb | 33.91% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/80.png | 3.36kb | 2.33kb | 30.70% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/256.png | 12.57kb | 8.87kb | 29.44% | | /ios/Mobile Video Loop Extension/Resources/images/icon-256.png | 12.57kb | 8.87kb | 29.44% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/76.png | 3.24kb | 2.31kb | 28.58% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/216.png | 10.26kb | 7.35kb | 28.38% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/72.png | 3.06kb | 2.24kb | 26.83% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/196.png | 9.26kb | 6.80kb | 26.57% | | /ios/Mobile Video Loop Extension/Resources/images/icon-64.png | 2.70kb | 2.02kb | 25.20% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/64.png | 2.70kb | 2.02kb | 25.20% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/180.png | 8.37kb | 6.27kb | 25.07% | | /ios/Mobile Video Loop Extension/Resources/images/toolbar-icon-32.png | 1.18kb | 0.90kb | 24.28% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/172.png | 7.87kb | 6.00kb | 23.74% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/167.png | 7.63kb | 5.87kb | 23.07% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/152.png | 6.88kb | 5.30kb | 22.92% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/60.png | 2.51kb | 1.95kb | 22.46% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/57.png | 2.43kb | 1.91kb | 21.44% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/58.png | 2.45kb | 1.93kb | 21.34% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/144.png | 6.35kb | 5.07kb | 20.16% | | /ios/Mobile Video Loop Extension/Resources/images/icon-128.png | 5.65kb | 4.53kb | 19.80% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/128.png | 5.65kb | 4.53kb | 19.80% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/114.png | 5.02kb | 4.07kb | 19.04% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/55.png | 2.33kb | 1.89kb | 18.78% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/48.png | 2.03kb | 1.67kb | 18.11% | | /ios/Mobile Video Loop Extension/Resources/images/icon-48.png | 2.03kb | 1.67kb | 18.11% | | /ios/Mobile Video Loop Extension/Resources/images/icon-100.png | 4.36kb | 3.60kb | 17.61% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/100.png | 4.36kb | 3.60kb | 17.61% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/120.png | 5.15kb | 4.25kb | 17.58% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/50.png | 2.11kb | 1.74kb | 17.57% | | /ios/Mobile Video Loop Extension/Resources/images/icon-88.png | 3.77kb | 3.28kb | 12.97% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/88.png | 3.77kb | 3.28kb | 12.97% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/87.png | 3.64kb | 3.20kb | 12.15% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/40.png | 1.66kb | 1.51kb | 9.10% | | /ios/Mobile Video Loop Extension/Resources/images/toolbar-icon-20.png | 0.78kb | 0.72kb | 7.89% | | /ios/Tarda/Assets.xcassets/AppIcon.appiconset/32.png | 1.32kb | 1.31kb | 0.74% | | | | | | | Total : | 267.74kb | 174.36kb | 34.88% |


    πŸ“ docs | :octocat: repo | πŸ™‹πŸΎ issues | πŸͺ marketplace

    ~Imgbot - Part of Optimole family

    opened by imgbot[bot] 0
  • [ImgBot] Optimize images

    [ImgBot] Optimize images

    Beep boop. Your images are optimized!

    Your image file size has been reduced by 39% πŸŽ‰

    Details

    | File | Before | After | Percent reduction | |:--|:--|:--|:--| | /ios/Mobile Video Loop Extension/Resources/images/icon-512.png | 128.46kb | 68.50kb | 46.68% | | /ios/Mobile Video Loop Extension/Resources/images/icon-256.png | 42.39kb | 26.71kb | 37.00% | | /ios/Mobile Video Loop/Resources/Icon.png | 97.68kb | 61.93kb | 36.59% | | /ios/Mobile Video Loop Extension/Resources/images/icon-128.png | 14.65kb | 10.76kb | 26.56% | | /ios/Mobile Video Loop Extension/Resources/images/icon-96.png | 9.52kb | 7.43kb | 21.97% | | /ios/Mobile Video Loop Extension/Resources/images/icon-64.png | 5.03kb | 4.36kb | 13.41% | | /ios/Mobile Video Loop Extension/Resources/images/icon-48.png | 3.36kb | 3.13kb | 6.69% | | /ios/Mobile Video Loop Extension/Resources/images/toolbar-icon-38.png | 1.09kb | 1.04kb | 5.00% | | | | | | | Total : | 302.18kb | 183.85kb | 39.16% |


    πŸ“ docs | :octocat: repo | πŸ™‹πŸΎ issues | πŸͺ marketplace

    ~Imgbot - Part of Optimole family

    opened by imgbot[bot] 0
  • [ImgBot] Optimize images

    [ImgBot] Optimize images

    Beep boop. Your images are optimized!

    Your image file size has been reduced by 22% πŸŽ‰

    Details

    | File | Before | After | Percent reduction | |:--|:--|:--|:--| | /ios/Mobile Video Loop Extension/Resources/images/toolbar-icon-64.png | 2.02kb | 1.38kb | 31.88% | | /ios/Mobile Video Loop Extension/Resources/images/icon-512.png | 24.95kb | 18.20kb | 27.06% | | /ios/Mobile Video Loop Extension/Resources/images/toolbar-icon-48.png | 2.79kb | 2.09kb | 24.93% | | /ios/Mobile Video Loop Extension/Resources/images/icon-256.png | 11.20kb | 8.64kb | 22.91% | | /ios/Mobile Video Loop Extension/Resources/images/toolbar-icon-40.png | 2.33kb | 1.83kb | 21.31% | | /ios/Mobile Video Loop Extension/Resources/images/icon-128.png | 5.05kb | 4.16kb | 17.64% | | /ios/Mobile Video Loop Extension/Resources/images/toolbar-icon-32.png | 1.96kb | 1.63kb | 16.75% | | /ios/Mobile Video Loop Extension/Resources/images/icon-100.png | 3.83kb | 3.27kb | 14.70% | | /ios/Mobile Video Loop Extension/Resources/images/icon-88.png | 3.39kb | 3.02kb | 10.99% | | /ios/Mobile Video Loop Extension/Resources/images/icon-64.png | 2.35kb | 2.18kb | 7.16% | | /ios/Mobile Video Loop Extension/Resources/images/toolbar-icon-20.png | 1.36kb | 1.29kb | 4.47% | | /ios/Mobile Video Loop Extension/Resources/images/icon-48.png | 1.75kb | 1.70kb | 2.90% | | | | | | | Total : | 62.99kb | 49.40kb | 21.57% |


    πŸ“ docs | :octocat: repo | πŸ™‹πŸΎ issues | πŸͺ marketplace

    ~Imgbot - Part of Optimole family

    opened by imgbot[bot] 0
  • Images in comments

    Images in comments

    I was looking for some other features to add, and I found a Quora answer on some question regarding what features do you want to see on YouTube.

    The answer was about images in comments. I didn't even add that to Velnota since it was expensive, but if users post on Imgur then we have a different story. We can detect Imgur links and convert to img tags.

    enhancement 
    opened by Andrew-Chen-Wang 1
  • Chrome + Firefox Desktop Browser Extension

    Chrome + Firefox Desktop Browser Extension

    It turns out the manifest.json and JS files are pretty ubiquitous for all web browsers, so publishing to them should be relatively easy (as expected for the browser specs and oml the frat's blaring music rn...).

    Apparently, Chrome extensions are not possible for Android, but Firefox for Android may so...

    enhancement 
    opened by Andrew-Chen-Wang 0
Owner
Andrew Chen Wang
Why is post-encouragement discouragement futile?
Andrew Chen Wang
Loop video using Optical Flow on iOS/Mac

Perfect-Loop-Maker Loop video using Optical Flow and Metal on iOS Description The app loops video to make an effect like it is endless, it uses optica

Sviatoslav 36 Nov 21, 2022
VideoBackgroundSwiftUI - Video Background loop made with SwiftUI

VideoBackgroundSwiftUI (Updated) Video Background loop made with SwiftUI Video N

Shreyas Bhike 19 Sep 9, 2022
Swift library for embedding and controlling YouTube videos in your iOS applications via WKWebView!

YouTubePlayer Embed and control YouTube videos in your iOS applications! Neato, right? Let's see how it works. 0.7.0 Update: WKWebView breaking change

Giles Van Gruisen 825 Jan 3, 2023
YouTubePlayerKit A Swift Package to easily play YouTube videos πŸ“Ί

A Swift Package to easily play YouTube videos ??

Sven Tiigi 304 Jan 7, 2023
YouTube video player for iOS, tvOS and macOS

About XCDYouTubeKit is a YouTube video player for iOS, tvOS and macOS. Are you enjoying XCDYouTubeKit? You can say thank you with a tweet. I am also a

CΓ©dric Luthi 2.9k Jan 7, 2023
WatchTube: a standalone WatchOS youtube player utilizing Download API for search data and video streaming

WatchTube is a standalone WatchOS youtube player utilizing Download API for sear

WatchTubeTeam 11 May 30, 2022
Catalyst example of a grid-based video app that opens videos in secondary windows

Simple Catalyst example (Mac idiom) of a grid-based app populated with videos. On macOS, double-clicking a video opens it in a new playback window. Keyboard navigation is fully supported via the UIKit Focus Engine.

Steven Troughton-Smith 19 Dec 8, 2022
Hide the "Latest Video Performance" tab in YouTube Studio

Hide Latest Video Performance - YT Studio Extension that hides the stupid YouTube Studio "Latest Video Performance" / "Latest YouTube Short Performanc

Taranasus 2 Jul 22, 2022
MMPlayerView - Custom AVPlayerLayer on view and transition player with good effect like youtube and facebook

MMPlayerView Demo-Swift List / Shrink / Transition / Landscape MMPlayerLayer ex. use when change player view frequently like tableView / collectionVie

Millman Yang 724 Nov 24, 2022
Youtube-like double tap to forward/rewind animation with ripple effect.

VideoQuickSeeking Youtube-like double tap to forward/rewind animation with ripple effect. Please feel free to make pull requests. Example To run the e

Hai Pham 3 Dec 7, 2022
Video mp4 record save display - How to Take , Save and Display a .mp4 Video

Technicalisto How to Take , Save and Display a .mp4 Video Add your design with v

Aya Baghdadi 2 Aug 7, 2022
A fully functional short video app project.Record a six secends video while playing prank sounds.

prankPro A fully functional short video app project How to Install 1. use coconapod to init your xcode environment. 2. change the app-keys in `applica

huijimuhe 258 Jun 19, 2022
JDVideoKit - You can easily transfer your video into Three common video type.

JDVideoKit Introduction You can easily transfer your video into Three common video type. You can use set up camera easily. Installation pod 'JDVideoK

郭介騡 24 Sep 9, 2021
A Swift library to upload video files to api.video platform.

api.video IOS video uploader api.video is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and manag

api.video 7 Dec 9, 2022
api.video is the video infrastructure for product builders

api.video is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app.

api.video 4 Jun 27, 2022
Collection of Swift/iOS-related conference videos. A demo project for SuperArc framework - building modular iOS apps with a Β΅Component architecture.

SwiftCommunity Beta version is available at TestFlight Collection of Swift/iOS-related conference videos. This project serves as a showcase for the Su

SuperArcSwift 52 Dec 2, 2022
ABMediaView can display images, videos, as well as now GIFs and Audio!

Media view which subclasses UIImageView, and can display & load images, videos, GIFs, and audio and from the web, and has functionality to minimize from fullscreen, as well as show GIF previews for videos.

Andrew Boryk 80 Dec 20, 2022
This project is a clone of YouTube. But the main intention is to show how to write clean code, using proper MVC patterns and re-usable coding methodologies!

YouTubeClone This project is a clone of YouTube. But the main intention is to show how to write clean code, using proper MVC patterns and re-usable co

Vamshi Krishna 169 Dec 10, 2022
Lightweight YouTube Downloader for iOS

DownTube DownTube is a very lightweight app that allows you to download any YouTube video for offline use. Note: this app goes against YouTube's TOS a

Adam Boyd 158 Dec 10, 2022