@@ -574,39 +574,6 @@ public static native String getUserAgent() /*-{
574
574
}
575
575
}-*/ ;
576
576
577
- public static native void removeMediaPlayer () /*-{
578
- $wnd.swfobject.removeSWF("jsmediaplayer");
579
- }-*/ ;
580
-
581
- public static native void createMediaPlayer (String mediaUrl , String mediaProvider , String width , String height ) /*-{
582
- $wnd.swfobject.embedSWF("../js/mediaplayer/player.swf", "mediaplayercontainer", width, height, "9.0.0", "../js/mediaplayer/expressinstall.swf", {
583
- file: mediaUrl,
584
- provider: mediaProvider,
585
- autostart: "true",
586
- width: width,
587
- height: height
588
- }, {allowscriptaccess: "always", allowfullscreen: "true"}, {id: "jsmediaplayer", name: "jsmediaplayer"});
589
- }-*/ ;
590
-
591
- public static native void resizeMediaPlayer (String width , String height ) /*-{
592
- obj = $wnd.swfobject.getObjectById('jsmediaplayer');
593
- obj.width = width;
594
- obj.height = height;
595
- }-*/ ;
596
-
597
- public static native void createSwfViewer (String swfUrl , String width , String height ) /*-{
598
- $wnd.swfobject.embedSWF(swfUrl, "swfviewercontainer", width, height, "9.0.0", "../js/mediaplayer/expressinstall.swf", {
599
- width: width,
600
- height: height
601
- }, {}, {id: "jswfviewer", name: "jswfviewer"});
602
- }-*/ ;
603
-
604
- public static native void resizeSwfViewer (String width , String height ) /*-{
605
- obj = $wnd.swfobject.getObjectById('jswfviewer');
606
- obj.width = width;
607
- obj.height = height;
608
- }-*/ ;
609
-
610
577
public static native void createPDFViewerFlexPaper (String pdfUrl , String width , String height ) /*-{
611
578
fpViewer = "../js/flexpaper/FlexPaperViewer.swf";
612
579
pdfUrl = encodeURIComponent(pdfUrl);
@@ -648,9 +615,12 @@ public static native void resizePDFViewerFlexPaper(String width, String height)
648
615
}-*/ ;
649
616
650
617
public static native void resizeEmbededPDF (String width , String height , String pdfId ) /*-{
651
- obj = $wnd.document.getElementById(pdfId);
652
- obj.width = width;
653
- obj.height = height;
618
+ obj = $wnd.document.getElementById(pdfId);
619
+ // Take in consideration if object exists
620
+ if (obj != null) {
621
+ obj.width = width;
622
+ obj.height = height;
623
+ }
654
624
}-*/ ;
655
625
656
626
public static native void copyToClipboard (String text ) /*-{
0 commit comments