VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /var/www/html/webrtc/tutorials/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/webrtc/tutorials/dial.html
<!-- dial.html -->

<style>
#video-out {
    position: relative;
}
#my-number {
    position: fixed;
    left: 10px;
    color: #fff;
    z-index: 100;
}
</style>

<!-- Video Output Zone -->
<input id="number" /><button onclick="call()">call</button>
<div id="video-out">
    <div id="my-number">Loading...</div>
</div>

<!-- Libs and Scripts -->
<!-- <script src="https://stephenlb.github.io/webrtc-sdk/js/webrtc-v2.js"></script> -->
<script src="https://cdn.pubnub.com/pubnub.js"></script>
<script src="https://stephenlb.github.io/webrtc-sdk/js/webrtc.js"></script>

<script>
    var session = null;
    const number = (''+Math.random()*100000).split('.')[0];
    console.log(number);
    document.getElementById('my-number').innerHTML = number;
    
    var phone = PHONE({
        number        : number,
        publish_key   : 'pub-c-561a7378-fa06-4c50-a331-5c0056d0163c',
        subscribe_key : 'sub-c-17b7db8a-3915-11e4-9868-02ee2ddab7fe',
        media         : { audio : true, video : true },
        ssl           : true
    });

    phone.ready(function(){
        console.log('Phone is ready');
        console.log('Camera is ready', phone.video);
        PUBNUB.$('video-out').append(phone.video);
    });

    // When Call Comes In or is to be Connected
    phone.receive(function(session){
        console.log('Receiving call from Friend!');
        session.connected(function(session){
            // Display Your Friend's Live Video
            console.log("Showing your friend's video stream");
            PUBNUB.$('video-out').appendChild(session.video);
        });
    });

    function call() {
        var callee = document.getElementById('number').value;
        console.log('calling ' + callee)
        session = phone.dial(callee);
    }
</script>

VaKeR 2022