Skip to content

Commit e2d8874

Browse files
committed
HTML 5 player video function
fix #219
1 parent c019f41 commit e2d8874

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+9845
-2128
lines changed

src/main/java/com/openkm/frontend/client/util/Util.java

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -574,39 +574,6 @@ public static native String getUserAgent() /*-{
574574
}
575575
}-*/;
576576

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-
610577
public static native void createPDFViewerFlexPaper(String pdfUrl, String width, String height) /*-{
611578
fpViewer = "../js/flexpaper/FlexPaperViewer.swf";
612579
pdfUrl = encodeURIComponent(pdfUrl);
@@ -648,9 +615,12 @@ public static native void resizePDFViewerFlexPaper(String width, String height)
648615
}-*/;
649616

650617
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+
}
654624
}-*/;
655625

656626
public static native void copyToClipboard(String text) /*-{

src/main/java/com/openkm/frontend/client/widget/properties/HTMLPreview.java

Lines changed: 0 additions & 75 deletions
This file was deleted.

0 commit comments

Comments
 (0)