0

I am working on a project that requires me to play multiple videos and control them all at once. So far I can click on the qmlscene and the app will play all the videos. Now I want to add play/pause buttons, seek button and slider bars for speed and progress.

My current code is the following:

import QtQuick 2.1
import QtMultimedia 5.0

Rectangle{

    id:mainRect
    width: 1900
    height: 950
    color:"darkgrey"

    Video{
        id:video1   
        x:0
        y:50
        width: mainRect.width/3
        height: 360
        source :"F:/TestingVideos/Cash Office Camera/N01000713.mp4"
    }

    Video{
        id:video2
        x:450        
        y:50        
        width: mainRect.width/3        
        height: 360        
        source :"F:/TestingVideos/Cash Office Camera/N02000713.mp4"       
    }

    Video{  
        id:video3     
        x:900       
        y:50       
        width: mainRect.width/3       
        height: 360       
        source :"F:/TestingVideos/Cash Office Camera/N03000713.mp4"        
    }    

    Video{    
        id:video4        
        x:1350        
        y:50        
        width: mainRect.width/3        
        height: 360        
        source :"F:/TestingVideos/Cash Office Camera/N04000713.mp4"        
    }       

    Video{        
        id:video5        
        x:0        
        y:420        
        width: mainRect.width/3       
        height: 360        
        source :"F:/TestingVideos/Cash Office Camera/N05000713.mp4"       
    }

    Video{        
        id:video6        
        x:450        
        y:420        
        width: mainRect.width/3        
        height: 360        
        source :"F:/TestingVideos/Cash Office Camera/N06000713.mp4"        
    }  

    Video{       
        id:video7       
        x:900        
        y:420       
        width: mainRect.width/3        
        height: 360        
        source :"F:/TestingVideos/Cash Office Camera/N07000713.mp4"        
    }

    Video{      
        id:video8       
        x:1350       
        y:420        
        width: mainRect.width/3        
        height: 360        
        source :"F:/TestingVideos/Cash Office Camera/N08000714.mp4"        
    }  

    MouseArea {       
        x: 26        
        anchors.rightMargin: 0        
        anchors.bottomMargin: 0        
        anchors.leftMargin: 0        
        anchors.topMargin: 0        
        anchors.fill: parent        

        onClicked: {            
            video1.play()            
            video2.play()            
            video3.play()            
            video4.play()          
            video5.play()            
            video6.play()            
            video7.play()            
            video8.play()            
        }        
    } 
}
BaCaRoZzo
  • 7,502
  • 6
  • 51
  • 82
Billal
  • 17
  • 5
  • You can have a look to the overlay examples in standard library, especially [this](http://doc.qt.io/qt-5/qtmultimedia-declarative-camera-example.html) and [this](http://doc.qt.io/qt-5/qtmultimedia-video-qmlvideo-example.html). – BaCaRoZzo Mar 03 '15 at 17:55
  • Hmm ... as I see you still ignore the solution with layouts :) – folibis Mar 03 '15 at 22:35
  • I used the grid layout before but it was rigid,how do I make the video resize, full screen etc? and how do I control all the videos by playing, pausing, seek...? – Billal Mar 04 '15 at 06:42

0 Answers0