@ -1,16 +1,10 @@
< template >
< template >
< v -container >
< v -btn @ click = "deviceSelectDialog = true" > change < / v - b t n >
< v -btn @click ="screenShare" > share a screen < / v-btn >
< v -btn @click ="screenShareStop" v-if ="screenShareStarted" > stop screen share < / v-btn >
< v -btn @click ="sharePdf=true" > share a pdf < / v-btn >
< PdfShare v -if = " sharePdf " :username ="username" :onstop ="stopSharePdf" :opaque-id ="opaqueId" :room ="room" :janus-init ="janusInit" > < / PdfShare >
< v -container fill -height >
< PdfShare v -if = " sharePdf " :username ="username" :opaque-id ="opaqueId" :room ="room" :janus-init ="janusInit" > < / PdfShare >
< v -dialog
< v -dialog
v - model = "mozillaAlert"
v - model = "mozillaAlert"
max - width = "41 0"
max - width = "600"
>
>
< v -card >
< v -card >
< v -card -title class = "headline" > Share whole screen or a window ? < / v - c a r d - t i t l e >
< v -card -title class = "headline" > Share whole screen or a window ? < / v - c a r d - t i t l e >
@ -26,9 +20,10 @@
< v -spacer > < / v - s p a c e r >
< v -spacer > < / v - s p a c e r >
< / v - c a r d - a c t i o n s >
< / v - c a r d - a c t i o n s >
< / v - c a r d >
< / v - c a r d >
< / v - d i a l o g > < v - d i a l o g
< / v - d i a l o g >
< v -dialog
v - model = "chromeAlert"
v - model = "chromeAlert"
max - width = "41 0"
max - width = "60 0"
>
>
< v -card >
< v -card >
< v -card -title class = "headline" > Chrome Extension Error < / v - c a r d - t i t l e >
< v -card -title class = "headline" > Chrome Extension Error < / v - c a r d - t i t l e >
@ -91,6 +86,7 @@
< / v - c a r d - a c t i o n s >
< / v - c a r d - a c t i o n s >
< / v - c a r d >
< / v - c a r d >
< / v - d i a l o g >
< / v - d i a l o g >
< v -row >
< v -row >
< v -col cols = "12" md = "2" >
< v -col cols = "12" md = "2" >
< video ref = "ownstream" class = "rounded centered" id = "myvideo" width = "100%" height = "100%" autoplay
< video ref = "ownstream" class = "rounded centered" id = "myvideo" width = "100%" height = "100%" autoplay
@ -104,6 +100,57 @@
< RemoteFeed :opaqueId ="opaqueId" :mypvtid ="mypvtid" :feedid ="remoteStream.id" :remote-stream ="remoteStream" :janusInit ="janusInit" :room ="room" > < / RemoteFeed >
< RemoteFeed :opaqueId ="opaqueId" :mypvtid ="mypvtid" :feedid ="remoteStream.id" :remote-stream ="remoteStream" :janusInit ="janusInit" :room ="room" > < / RemoteFeed >
< / v - c o l >
< / v - c o l >
< / v - r o w >
< / v - r o w >
< v -speed -dial
v - model = "fab"
bottom
left
direction = "top"
open - on - hover
>
< template v -slot : activator >
< v -btn
v - model = "fab"
color = "blue darken-2"
dark
fab
>
< v -icon v-if ="fab" > mdi -cog -outline < / v-icon >
< v -icon v-else > mdi -cog -outline < / v-icon >
< / v - b t n >
< / template >
< v -btn
fab
dark
small
@ click = "sharePdf=true"
>
< v -icon > mdi - pdf - box < / v - i c o n >
< / v - b t n > < v - b t n
fab
dark
small
@ click = "$vuetify.theme.dark=!$vuetify.theme.dark"
>
< v -icon > mdi - compare < / v - i c o n >
< / v - b t n >
< v -btn
fab
dark
small
@ click = "deviceSelectDialog = true"
>
< v -icon > mdi - camera - outline < / v - i c o n >
< / v - b t n >
< v -btn
fab
: dark = "!screenShareStarted"
small
@ click = "screenShareSwitch"
>
< v -icon > mdi - monitor - screenshot < / v - i c o n >
< / v - b t n >
< / v - s p e e d - d i a l >
< / v - c o n t a i n e r >
< / v - c o n t a i n e r >
< / template >
< / template >
@ -137,6 +184,7 @@
audioDevices : [ ] ,
audioDevices : [ ] ,
deviceSelectDialog : false ,
deviceSelectDialog : false ,
noVid : false ,
noVid : false ,
fab : true ,
shareScreenId : null ,
shareScreenId : null ,
remoteStreams : [ ] ,
remoteStreams : [ ] ,
screenShareStarted : false
screenShareStarted : false
@ -197,10 +245,15 @@
}
}
} ,
} ,
onlocalstreamScreen ( stream ) {
onlocalstreamScreen ( stream ) {
if ( ! this . screenShareStarted )
this . screenShareStarted = true ;
this . $refs . ownstreamscreen . srcObject = stream
this . $refs . ownstreamscreen . srcObject = stream
} ,
} ,
screenShareSwitch ( ) {
if ( this . screenShareStarted ) {
this . screenShareStop ( )
} else {
this . screenShare ( )
}
} ,
shareScreenStart ( capture ) {
shareScreenStart ( capture ) {
this . capture = capture
this . capture = capture
this . janusInit . attach (
this . janusInit . attach (
@ -216,6 +269,7 @@
onlocalstream : this . onlocalstreamScreen
onlocalstream : this . onlocalstreamScreen
}
}
)
)
this . screenShareStarted = true ;
} ,
} ,
screenShareStop ( ) {
screenShareStop ( ) {
var srcObject = this . $refs . ownstreamscreen . srcObject ;
var srcObject = this . $refs . ownstreamscreen . srcObject ;
önce ekran paylaş diyip daha sonra webrtc iznini iptal ettiğinde ekran paylaşılmadığı halde ekran paylaşılıyor gösteriyor. Ondan dolayı onlocalstreamScreen methodunun içine taşımıştım.
hem chrome hem de firefoxda aynı.