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

Flip video on the X-axis & Y-axis #80

Closed
Drachlox opened this issue Aug 10, 2019 · 5 comments
Closed

Flip video on the X-axis & Y-axis #80

Drachlox opened this issue Aug 10, 2019 · 5 comments
Labels
bounty Will pass on donations (Optional) - (OR: Requester will pay personally. Only if stated!) Feature request Wish or idea good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥

Comments

@Drachlox
Copy link

Addon allready has feature to rotate video, but some video on youtube is flipped on the X-axis to avoid copyright strikes. It would therefore be great to have the option to flip it back.

@ghost ghost added the Feature request Wish or idea label Sep 11, 2019
@Bagus23
Copy link
Contributor

Bagus23 commented Sep 20, 2019

+1 for this, add mirroring and advanced playback speed feature like MirrorTube is really helpful for dancers too.

@ghost ghost changed the title [Feature Request] Flip video Flip video on the X-axis & Y-axis Apr 13, 2020
@ghost ghost added enhancement (easy) and removed Feature request Wish or idea labels Apr 13, 2020
@TomasDmArg
Copy link

TomasDmArg commented Oct 13, 2020

Hi!, you can use this:


      //creates a button at the top of the video description, pressing it activates the "rotar" function
    document.getElementById("description").insertAdjacentHTML("beforebegin", "<button onclick='rotar();' style='width: 
    40mm; height: 10mm; background-color: #c00; border: none; color: #fff'><b>Rotate</b></button>")

     //creates a variable called vidplayer that stores all the styles of an element 
    let vidplayer = document.querySelector("video");

     //then, creates another variable called rotstate that allows me to know the status of the rotation, 0 if it is normal, 1 if it is 
     rotated.
    let rotstate = 0;

    //creates the function called "rotar" which I called on the button
   function rotar() {

  //i check the value of rotstate, if the video doesn't rotate, I rotate it. and if it already is, I return it to its original state
 if (rotstate == 0 ){

   //rotates the video
vidplayer.style["transform"] = "rotateY(180deg)"; 
    vidplayer.style["-webkit-transform"] = "rotateY(180deg)"; 
    vidplayer.style["-moz-transform"] = "rotateY(180deg)";

   //rotstate increases its value to 1
    rotstate++;
   }else if (rotstate == 1){

     //rotates the video
vidplayer.style["transform"] = "rotateY(0deg)"; 
    vidplayer.style["-webkit-transform"] = "rotateY(0deg)"; 
    vidplayer.style["-moz-transform"] = "rotateY(0deg)";

    //reduce rotstate
    rotstate--;
}

}

@TomasDmArg
Copy link

TomasDmArg commented Oct 13, 2020

and if you want to rotate it on the X axis:

 //creates a button at the top of the video description, pressing it activates the "rotar" function
document.getElementById("description").insertAdjacentHTML("beforebegin", "<button onclick='rotar();' style='width: 
40mm; height: 10mm; background-color: #c00; border: none; color: #fff'><b>Rotate</b></button>")

 //creates a variable called vidplayer that stores all the styles of an element 
let vidplayer = document.querySelector("video");

 //then, creates another variable called rotstate that allows me to know the status of the rotation, 0 if it is normal, 1 if it is 
 rotated.
let rotstate = 0;

//creates the function called "rotar" which I called on the button
 function rotar() {

//i check the value of rotstate, if the video doesn't rotate, I rotate it. and if it already is, I return it to its original state
if (rotstate == 0 ){

//rotates the video
vidplayer.style["transform"] = "rotateX(180deg)"; 
vidplayer.style["-webkit-transform"] = "rotateX(180deg)"; 
vidplayer.style["-moz-transform"] = "rotateX(180deg)";

//rotstate increases its value to 1
rotstate++;
}else if (rotstate == 1){

 //rotates the video
 vidplayer.style["transform"] = "rotateX(0deg)"; 
vidplayer.style["-webkit-transform"] = "rotateX(0deg)"; 
vidplayer.style["-moz-transform"] = "rotateX(0deg)";

//reduce rotstate
rotstate--;
}

}

@ghost ghost removed Help Wanted labels Dec 11, 2020
@ImprovedTube ImprovedTube added the help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) label Dec 13, 2020
@ghost ghost removed the help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) label Dec 13, 2020
@mrangjunboon2017s
Copy link

how u do it.

@ImprovedTube ImprovedTube added the up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥ label Nov 29, 2022
@ImprovedTube ImprovedTube added help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* labels Oct 19, 2023
@ImprovedTube ImprovedTube added the bounty Will pass on donations (Optional) - (OR: Requester will pay personally. Only if stated!) label Nov 5, 2023
@ImprovedTube
Copy link
Member

#1445

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty Will pass on donations (Optional) - (OR: Requester will pay personally. Only if stated!) Feature request Wish or idea good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥
Projects
Status: Done
Development

No branches or pull requests

5 participants