0

I've just added vline to my php5/jQuery portal.

Everything seems to work good but a thing that's driving me mad.

Suppose to have two users calling one each other via vline. User1 calls User2, User2 answers, after some time User2 hangs up the call. User1 still sees the Video Panel and he cannot dismiss it.

This happens also il User2 declines the call, User1 sees the Video Panel.

Can someone help me address this issue?

Thanks

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Xabaras
  • 33
  • 1
  • 7
  • Are you using our [videopanel widget](https://vline.com/developer/docs/ui_widgets) or are you creating a [media element from the MediaStream](https://vline.com/developer/docs/vline.js/vline.MediaStream#createVideoElement)? Have you taken a look at the Shell example (which has a flag to use the VideoPanel widget) or the PHP example See https://vline.com/developer/docs/examples. – tomtheengineer Dec 05 '13 at 19:30
  • I'm using the person.startMedia(); method to start a new call and I created the client this way: `client = vline.Client.create({"serviceId": serviceId, "ui": true});` – Xabaras Dec 10 '13 at 15:07
  • Did someone manage to solve it? I still have this problem, cannot dismiss Video Panel widget when other side terminates call – Xabaras Mar 27 '14 at 12:09

1 Answers1

1

I finally managed to make it work by doing the following:

  • Added a video-wrapper <div> to my html
  • Created the vline client by passing in this option "uiVideoPanel": "video-wrapper"
  • handled the following events

    • enterState:incoming
    • enterState:outgoing
    • enterState:closed

as follows:

client = vline.Client.create({
    "serviceId": serviceId,
    "ui": true,
    "uiVideoPanel": "video-wrapper"
});

client.on('enterState:incoming', handleShowWrapper).
on('enterState:outgoing', handleShowWrapper).
on('enterState:closed', handleHideWrapper);

function handleShowWrapper(event) {
    $("#video-wrapper").show();
}

function handleHideWrapper(event) {
    $("#video-wrapper").html("");
    $("#video-wrapper").hide();
}

Obviously it's a workaround but at least it make the call flow work properly.

Let me know if someone has a more elegant solution or if vline manage to solve it and the workaround is no more needed.

Thanks

Xabaras
  • 33
  • 1
  • 7