File tree Expand file tree Collapse file tree 2 files changed +10
-22
lines changed
Expand file tree Collapse file tree 2 files changed +10
-22
lines changed Original file line number Diff line number Diff line change @@ -8,22 +8,8 @@ const props = defineProps({
88 callerId: {
99 type: String ,
1010
11- },
12- canLogin: {
13- type: Boolean ,
14- },
15- canRegister: {
16- type: Boolean ,
17- },
18- laravelVersion: {
19- type: String ,
20- required: true ,
21- },
22- phpVersion: {
23- type: String ,
24- required: true ,
25- },
26- });
11+ }
12+ })
2713
2814
2915const form = useForm ({
@@ -33,7 +19,7 @@ const form = useForm({
3319
3420const submit = async () => {
3521 console .log (' SUBMIT' )
36- await pc .createDataChannel (' Test ' );
22+ await pc .createDataChannel (props . callerId );
3723 form .sdp = await pc .createOffer ();
3824 console .log (form .caller_id )
3925 await pc .setLocalDescription (form .sdp );
@@ -72,6 +58,12 @@ const answer = async (caller_id) => {
7258 });
7359};
7460const pc = new RTCPeerConnection ();
61+ pc .ondatachannel = (e ) => {
62+ console .log (' New data channel' , e)
63+ }
64+ pc .ontrack = (e ) => {
65+ console .log (' New track' , e)
66+ }
7567onMounted (() => {
7668
7769 Echo .channel (props .callerId )
@@ -209,7 +201,7 @@ onMounted(() => {
209201 target =" _blank"
210202 id =" docs-card"
211203
212- > Laravel v{{ laravelVersion }} (PHP v{{ phpVersion }}) </a >
204+ > Created by Jyrone Parker </a >
213205 </footer >
214206 </div >
215207 </div >
Original file line number Diff line number Diff line change 77use Illuminate \Support \Str ;
88Route::get ('/ ' , function () {
99 return Inertia::render ('Welcome ' , [
10- 'canLogin ' => Route::has ('login ' ),
11- 'canRegister ' => Route::has ('register ' ),
12- 'laravelVersion ' => Application::VERSION ,
13- 'phpVersion ' => PHP_VERSION ,
1410 'callerId ' => Str::random (6 )
1511 ]);
1612});
You can’t perform that action at this time.
0 commit comments