Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
eslotsys-game-nuxt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
毛线
eslotsys-game-nuxt
Commits
02f2fdc9
Commit
02f2fdc9
authored
Jul 12, 2023
by
毛线
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save
parent
818fda9c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
WebRTCPlayer.vue
pages/index/game/components/WebRTCPlayer.vue
+1
-1
index.vue
pages/index/game/index.vue
+3
-0
jswebrtc.min.js
utils/jswebrtc.min.js
+0
-2
No files found.
pages/index/game/components/WebRTCPlayer.vue
View file @
02f2fdc9
<
template
>
<
template
>
<video
ref=
"jswebrtc"
style=
"width: 100%;height: 100%;object-fit: fill"
@
click=
"(e) => handler().click(e)"
/>
<video
ref=
"jswebrtc"
style=
"width: 100%;height: 100%;object-fit: fill"
webkit-playsinline
@
click=
"(e) => handler().click(e)"
/>
</
template
>
</
template
>
<
script
>
<
script
>
...
...
pages/index/game/index.vue
View file @
02f2fdc9
...
@@ -90,6 +90,9 @@ export default {
...
@@ -90,6 +90,9 @@ export default {
init
()
{
init
()
{
return
{
return
{
play
:
()
=>
{
play
:
()
=>
{
if
(
this
.
isPlay
)
{
return
}
const
url
=
this
.
device
?.
videoMainNumber
const
url
=
this
.
device
?.
videoMainNumber
const
webrtc
=
`webrtc://eslotstreaming.com
${
url
}
`
const
webrtc
=
`webrtc://eslotstreaming.com
${
url
}
`
this
.
$refs
.
webrtc
.
initVideo
(
webrtc
)
this
.
$refs
.
webrtc
.
initVideo
(
webrtc
)
...
...
utils/jswebrtc.min.js
View file @
02f2fdc9
...
@@ -287,9 +287,7 @@ JSWebrtc.Player = function() {
...
@@ -287,9 +287,7 @@ JSWebrtc.Player = function() {
clientip
:
null
,
clientip
:
null
,
sdp
:
offer
.
sdp
sdp
:
offer
.
sdp
};
};
console
.
log
(
"offer: "
+
JSON
.
stringify
(
data
));
JSWebrtc
.
HttpPost
(
url
,
JSON
.
stringify
(
data
)).
then
(
function
(
res
)
{
JSWebrtc
.
HttpPost
(
url
,
JSON
.
stringify
(
data
)).
then
(
function
(
res
)
{
console
.
log
(
"answer: "
+
JSON
.
stringify
(
res
));
resolve
(
res
.
sdp
)
resolve
(
res
.
sdp
)
},
function
(
rej
)
{
},
function
(
rej
)
{
reject
(
rej
)
reject
(
rej
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment