omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Video

    Pythonista
    2
    15
    5383
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • robertiii
      robertiii last edited by

      Ok. So I want to present a video in a UI view. I'll look around to see what I can find. This part I am pretty clueless on

      1 Reply Last reply Reply Quote 0
      • robertiii
        robertiii last edited by

        The goal is to have video play one place with controls another so the video would be similar to a background

        1 Reply Last reply Reply Quote 0
        • JonB
          JonB last edited by

          https://gist.github.com/3e708b73a04e5fc2e04569d9556198e3

          Okay, this was not too bad. There is a lot of code defining CMTime and seeking ability, which is not needed if you just want to play without seeking.

          1 Reply Last reply Reply Quote 1
          • robertiii
            robertiii last edited by

            Thanks so much! I'll try it when I get a chance! Let you know how it works out

            1 Reply Last reply Reply Quote 0
            • robertiii
              robertiii last edited by

              Video works great!!!!!! Any idea on how to get the name of the selected video?

              1 Reply Last reply Reply Quote 0
              • JonB
                JonB last edited by

                the phasset (in pick_asset) has a filename() method that returns the filename. You might want to modify that method as

                return asseturl, str(phasset.filename() )
                
                1 Reply Last reply Reply Quote 0
                • robertiii
                  robertiii last edited by

                  Thanks so much! You are incredible!

                  1 Reply Last reply Reply Quote 0
                  • robertiii
                    robertiii last edited by robertiii

                    How would I go about removing this avplayer later.

                    1 Reply Last reply Reply Quote 0
                    • robertiii
                      robertiii last edited by

                      Also, how would I use a button to go back to the beginning of the video?

                      1 Reply Last reply Reply Quote 0
                      • JonB
                        JonB last edited by

                        You can just remove_subview on the wrapper view to remove it. Technically maybe if you are planning on opening and closing a bunch of these, there is probably some cleanup that is required.

                        To seek. just use the seek function, and wrap a button action around it, similar to the way the slider action did.

                        1 Reply Last reply Reply Quote 0
                        • robertiii
                          robertiii last edited by

                          What cleanup would need to be done? I’m pretty much beginner coding.

                          1 Reply Last reply Reply Quote 0
                          • robertiii
                            robertiii last edited by

                            Also I’ve tried using the remove and have never been able to figure it out.

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post
                            Powered by NodeBB Forums | Contributors