cosmicy / winforms-geplugin-control-library

Automatically exported from code.google.com/p/winforms-geplugin-control-library
GNU General Public License v3.0
0 stars 0 forks source link

Embedded video appears to not stop playing when balloon closes #112

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create an htmlstringballoon using the information below
if (e.EventId == EventId.Click) {
  if (GEHelpers.IsApiType(feature, ApiType.KmlPlacemark)) {
    e.ApiObject.preventDefault();
    var balloon = ge1.createHtmlStringBalloon("");
    balloon.setFeature(feature);
    balloon.setContentString("<object width=\"425\" height=\"350\">
    <param name=\"movie\"" +
    "value=\"http://www.youtube.com/v/2_V-7g0LAZI\"></param>" +
    "<param name=\"wmode\" value=\"transparent\"></param>" +
    "<embed src=\"http://www.youtube.com/v/2_V-7g0LAZI\"" +
    "type=\"application/x-shockwave-flash\" wmode=\"transparent\"" +
    "width=\"425\" height=\"350\"></embed></object>");
  }
}
3. Open the balloon by clicking on a placemark, start the video, click outside 
the balloon.

What is the expected output? What do you see instead?
I expect the audio to stop - it does not.

What version of the product are you using? On what operating system?
7.1.1.1888 : Windows 7

Please provide any additional information below.
Note that the audio in the video linked above does not start right away.
Clicking on a placemark creates a new balloon and stops the audio.

Original issue reported on code.google.com by tracyJan...@gmail.com on 14 Aug 2013 at 9:56

GoogleCodeExporter commented 8 years ago
Hi,

I not sure if this is a bug with the library or the API itself, I will have to 
see if I can reproduce the behaviour. 

As a workaround you could simply try clearing the balloons when they are 
closed. For example using a global event.

{{{
geWebBrowser1.AddEventListener(ge, EventId.BalloonClose);
geWebBrowser1.PluginEvent += (o, e) =>
{
  ge.setBalloon(null);
}
}}}

Another option could be to use a single global balloon object and clear its 
contents, again when the balloon is closed. e.g.

{{{
// use this single 'balloon' object throughout.
dynamic balloon = ge.createHtmlStringBalloon(string.Empty);
geWebBrowser1.AddEventListener(ge, EventId.BalloonClose);
geWebBrowser1.PluginEvent += (o, e) =>
{
  if(balloon != null) {
    balloon.setContentString(string.Empty);
  }
}
}}}

Anyhow, thanks for bringing it to my attention.

Original comment by fraser.c...@gmail.com on 5 Sep 2013 at 1:46

GoogleCodeExporter commented 8 years ago
No further development now that the Earth API is depreciated. 

Original comment by fraser.c...@gmail.com on 17 Dec 2014 at 3:20