22w16d video playback fixes, fixed line endings in unix scripts
This commit is contained in:
parent
8655ed05f0
commit
b8cf84e97c
5
.gitattributes
vendored
5
.gitattributes
vendored
|
@ -1,6 +1,7 @@
|
||||||
#
|
#
|
||||||
# https://help.github.com/articles/dealing-with-line-endings/
|
# https://help.github.com/articles/dealing-with-line-endings/
|
||||||
#
|
#
|
||||||
# These are explicitly windows files and should use crlf
|
|
||||||
*.bat text eol=crlf
|
|
||||||
|
|
||||||
|
*.bat text eol=crlf
|
||||||
|
*.sh text eol=lf
|
||||||
|
gradlew text eol=lf
|
||||||
|
|
91185
javascript/classes.js
91185
javascript/classes.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -34,8 +34,8 @@ public class VideoMapPacketCodec {
|
||||||
this.posX = posX;
|
this.posX = posX;
|
||||||
this.posY = posY;
|
this.posY = posY;
|
||||||
this.posZ = posZ;
|
this.posZ = posZ;
|
||||||
this.volume = 1.0f;
|
this.volume = volume;
|
||||||
this.frameRate = 60;
|
this.frameRate = 30;
|
||||||
this.requiresPositionPacket = true;
|
this.requiresPositionPacket = true;
|
||||||
this.requiresFullResetPacket = true;
|
this.requiresFullResetPacket = true;
|
||||||
this.isDisabled = true;
|
this.isDisabled = true;
|
||||||
|
|
|
@ -4,7 +4,7 @@ public class ConfigConstants {
|
||||||
|
|
||||||
public static boolean profanity = false;
|
public static boolean profanity = false;
|
||||||
|
|
||||||
public static final String version = "22w16c";
|
public static final String version = "22w16d";
|
||||||
public static final String mainMenuString = "eaglercraft " + version;
|
public static final String mainMenuString = "eaglercraft " + version;
|
||||||
|
|
||||||
public static final String forkMe = "https://github.com/LAX1DUDE/eaglercraft";
|
public static final String forkMe = "https://github.com/LAX1DUDE/eaglercraft";
|
||||||
|
|
|
@ -891,7 +891,7 @@ public class EaglerAdapterImpl2 {
|
||||||
private static TextureGL videoTexture = null;
|
private static TextureGL videoTexture = null;
|
||||||
private static boolean videoIsLoaded = false;
|
private static boolean videoIsLoaded = false;
|
||||||
private static boolean videoTexIsInitialized = false;
|
private static boolean videoTexIsInitialized = false;
|
||||||
private static int frameRate = 17;
|
private static int frameRate = 33;
|
||||||
private static long frameTimer = 0l;
|
private static long frameTimer = 0l;
|
||||||
|
|
||||||
public static final boolean isVideoSupported() {
|
public static final boolean isVideoSupported() {
|
||||||
|
@ -937,6 +937,7 @@ public class EaglerAdapterImpl2 {
|
||||||
videosBuffer.remove(src);
|
videosBuffer.remove(src);
|
||||||
}else {
|
}else {
|
||||||
currentVideo = (HTMLVideoElement) win.getDocument().createElement("video");
|
currentVideo = (HTMLVideoElement) win.getDocument().createElement("video");
|
||||||
|
currentVideo.setAttribute("crossorigin", "anonymous");
|
||||||
currentVideo.setAutoplay(autoplay);
|
currentVideo.setAutoplay(autoplay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1019,6 +1020,7 @@ public class EaglerAdapterImpl2 {
|
||||||
if(!videosBuffer.containsKey(src)) {
|
if(!videosBuffer.containsKey(src)) {
|
||||||
HTMLVideoElement video = (HTMLVideoElement) win.getDocument().createElement("video");
|
HTMLVideoElement video = (HTMLVideoElement) win.getDocument().createElement("video");
|
||||||
video.setAutoplay(false);
|
video.setAutoplay(false);
|
||||||
|
video.setAttribute("crossorigin", "anonymous");
|
||||||
video.setPreload("auto");
|
video.setPreload("auto");
|
||||||
video.setControls(false);
|
video.setControls(false);
|
||||||
video.setSrc(src);
|
video.setSrc(src);
|
||||||
|
@ -1105,16 +1107,20 @@ public class EaglerAdapterImpl2 {
|
||||||
}
|
}
|
||||||
frameTimer = ms;
|
frameTimer = ms;
|
||||||
if(currentVideo != null && videoTexture != null && videoIsLoaded) {
|
if(currentVideo != null && videoTexture != null && videoIsLoaded) {
|
||||||
_wglBindTexture(_wGL_TEXTURE_2D, videoTexture);
|
try {
|
||||||
if(videoTexIsInitialized) {
|
_wglBindTexture(_wGL_TEXTURE_2D, videoTexture);
|
||||||
html5VideoTexSubImage2D(webgl, _wGL_TEXTURE_2D, _wGL_RGBA, _wGL_UNSIGNED_BYTE, currentVideo);
|
if(videoTexIsInitialized) {
|
||||||
}else {
|
html5VideoTexSubImage2D(webgl, _wGL_TEXTURE_2D, _wGL_RGBA, _wGL_UNSIGNED_BYTE, currentVideo);
|
||||||
html5VideoTexImage2D(webgl, _wGL_TEXTURE_2D, _wGL_RGBA, _wGL_RGBA, _wGL_UNSIGNED_BYTE, currentVideo);
|
}else {
|
||||||
_wglTexParameteri(_wGL_TEXTURE_2D, _wGL_TEXTURE_WRAP_S, _wGL_CLAMP);
|
html5VideoTexImage2D(webgl, _wGL_TEXTURE_2D, _wGL_RGBA, _wGL_RGBA, _wGL_UNSIGNED_BYTE, currentVideo);
|
||||||
_wglTexParameteri(_wGL_TEXTURE_2D, _wGL_TEXTURE_WRAP_T, _wGL_CLAMP);
|
_wglTexParameteri(_wGL_TEXTURE_2D, _wGL_TEXTURE_WRAP_S, _wGL_CLAMP);
|
||||||
_wglTexParameteri(_wGL_TEXTURE_2D, _wGL_TEXTURE_MIN_FILTER, _wGL_LINEAR);
|
_wglTexParameteri(_wGL_TEXTURE_2D, _wGL_TEXTURE_WRAP_T, _wGL_CLAMP);
|
||||||
_wglTexParameteri(_wGL_TEXTURE_2D, _wGL_TEXTURE_MAG_FILTER, _wGL_LINEAR);
|
_wglTexParameteri(_wGL_TEXTURE_2D, _wGL_TEXTURE_MIN_FILTER, _wGL_LINEAR);
|
||||||
videoTexIsInitialized = true;
|
_wglTexParameteri(_wGL_TEXTURE_2D, _wGL_TEXTURE_MAG_FILTER, _wGL_LINEAR);
|
||||||
|
videoTexIsInitialized = true;
|
||||||
|
}
|
||||||
|
}catch(Throwable t) {
|
||||||
|
// rip
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user