TASK: Initial version

parents
Pipeline #1471 failed with stage
in 49 seconds
{
"parser": "babel-eslint",
"rules": {
"strict": 0
}
}
\ No newline at end of file
coverage/*
.coverrun
npm-debug.log
dist/tmp
node_modules
\.DS_Store
image: docker:latest
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- export BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"`
- export VCS_REF=`git rev-parse --short HEAD`
build-master:
stage: build
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE" .
- docker push "$CI_REGISTRY_IMAGE"
only:
- master
build:
stage: build
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
except:
- master
coverage/*
.coverrun
npm-debug.log
dist/tmp
node_modules
sandbox
test
.codeclimate.yml
.eslintrc
.travis.yml
sftp-config.json
\ No newline at end of file
FROM alpine:3.5
MAINTAINER Dominique Feyer <dfeyer@medialib.tv>
ENV NGINX_VERSION 1.13.5
ENV NGX_BROTLI_COMMIT bfd2885b2da4d763fed18f49216bb935223cd34b
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.docker.dockerfile="/Dockerfile" \
org.label-schema.license="MIT" \
org.label-schema.name="medialib.tv player" \
org.label-schema.url="https://medialib.tv/docker/player" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://gitlab.ttree.ch/medialib.tv/player.git" \
org.label-schema.vcs-type="Git" \
tv.medialib.nginx.version=$NGINX_VERSION \
tv.medialib.nginx.brotli.commit=$NGX_BROTLI_COMMIT \
traefik.enable=true \
traefik.port=80 \
traefik.backend.loadbalancer.method="wrr" \
traefik.frontend.priority=10
RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \
&& CONFIG="\
--prefix=/etc/nginx \
--sbin-path=/usr/sbin/nginx \
--modules-path=/usr/lib/nginx/modules \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--pid-path=/var/run/nginx.pid \
--lock-path=/var/run/nginx.lock \
--http-client-body-temp-path=/var/cache/nginx/client_temp \
--http-proxy-temp-path=/var/cache/nginx/proxy_temp \
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp \
--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp \
--http-scgi-temp-path=/var/cache/nginx/scgi_temp \
--user=nginx \
--group=nginx \
--with-http_realip_module \
--with-http_addition_module \
--with-http_gzip_static_module \
--with-threads \
--with-stream \
--with-http_slice_module \
--with-file-aio \
--with-http_v2_module \
--with-ipv6 \
--add-module=/usr/src/ngx_brotli \
--with-cc-opt=-Wno-error \
" \
&& addgroup -S nginx \
&& adduser -D -S -h /var/cache/nginx -s /sbin/nologin -G nginx nginx \
&& apk add --no-cache --virtual .build-deps \
gcc \
libc-dev \
make \
openssl-dev \
pcre-dev \
zlib-dev \
linux-headers \
curl \
gnupg \
libxslt-dev \
gd-dev \
geoip-dev \
perl-dev \
&& apk add --no-cache --virtual .brotli-build-deps \
autoconf \
libtool \
automake \
git \
g++ \
cmake \
&& mkdir -p /usr/src \
&& cd /usr/src \
&& git clone --recursive https://github.com/google/ngx_brotli.git \
&& cd ngx_brotli \
&& git checkout -b $NGX_BROTLI_COMMIT $NGX_BROTLI_COMMIT \
&& cd .. \
&& curl -fSL http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz -o nginx.tar.gz \
&& curl -fSL http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz.asc -o nginx.tar.gz.asc \
&& export GNUPGHOME="$(mktemp -d)" \
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEYS" \
&& gpg --batch --verify nginx.tar.gz.asc nginx.tar.gz \
&& rm -r "$GNUPGHOME" nginx.tar.gz.asc \
&& mkdir -p /usr/src \
&& tar -zxC /usr/src -f nginx.tar.gz \
&& rm nginx.tar.gz \
&& cd /usr/src/nginx-$NGINX_VERSION \
&& ./configure $CONFIG --with-debug \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& mv objs/nginx objs/nginx-debug \
&& mv objs/ngx_http_xslt_filter_module.so objs/ngx_http_xslt_filter_module-debug.so \
&& mv objs/ngx_http_image_filter_module.so objs/ngx_http_image_filter_module-debug.so \
&& mv objs/ngx_http_geoip_module.so objs/ngx_http_geoip_module-debug.so \
&& mv objs/ngx_http_perl_module.so objs/ngx_http_perl_module-debug.so \
&& ./configure $CONFIG \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
&& rm -rf /etc/nginx/html/ \
&& mkdir /etc/nginx/conf.d/ \
&& mkdir -p /usr/share/nginx/html/ \
&& install -m644 html/index.html /usr/share/nginx/html/ \
&& install -m644 html/50x.html /usr/share/nginx/html/ \
&& install -m755 objs/nginx-debug /usr/sbin/nginx-debug \
&& install -m755 objs/ngx_http_xslt_filter_module-debug.so /usr/lib/nginx/modules/ngx_http_xslt_filter_module-debug.so \
&& install -m755 objs/ngx_http_image_filter_module-debug.so /usr/lib/nginx/modules/ngx_http_image_filter_module-debug.so \
&& install -m755 objs/ngx_http_geoip_module-debug.so /usr/lib/nginx/modules/ngx_http_geoip_module-debug.so \
&& install -m755 objs/ngx_http_perl_module-debug.so /usr/lib/nginx/modules/ngx_http_perl_module-debug.so \
&& ln -s ../../usr/lib/nginx/modules /etc/nginx/modules \
&& strip /usr/sbin/nginx* \
&& strip /usr/lib/nginx/modules/*.so \
&& rm -rf /usr/src/nginx-$NGINX_VERSION \
&& rm -rf /usr/src/ngx_brotli \
\
# Bring in gettext so we can get `envsubst`, then throw
# the rest away. To do this, we need to install `gettext`
# then move `envsubst` out of the way so `gettext` can
# be deleted completely, then move `envsubst` back.
&& apk add --no-cache --virtual .gettext gettext \
&& mv /usr/bin/envsubst /tmp/ \
\
&& runDeps="$( \
scanelf --needed --nobanner /usr/sbin/nginx /usr/lib/nginx/modules/*.so /tmp/envsubst \
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
| sort -u \
| xargs -r apk info --installed \
| sort -u \
)" \
&& apk add --no-cache --virtual .nginx-rundeps $runDeps \
&& apk del .build-deps \
&& apk del .brotli-build-deps \
&& apk del .gettext \
&& mv /tmp/envsubst /usr/local/bin/ \
\
# forward request and error logs to docker log collector
&& ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log
COPY docker/nginx.conf /etc/nginx/nginx.conf
COPY docker/default.conf /etc/nginx/conf.d/default.conf
COPY docker/data /data
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
The MIT License (MIT)
Copyright (c) 2015 moay
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
\ No newline at end of file
# medialib.tv player
medialib.tv video player with support for HLS, local MP4, Youtube and Vimeo. The player is a fork of afterflow player.
## Credits
medialib.tv player relies on scripts provided by many great people.
- [video.js](http://www.videojs.com/) published under the [Apache License 2.0](https://github.com/videojs/video.js/blob/master/LICENSE)
- [videojs-youtube](https://github.com/eXon/videojs-youtube) published under the [MIT License](https://github.com/eXon/videojs-youtube/blob/master/LICENSE)
- [videojs-vimeo](https://github.com/eXon/videojs-vimeo) published under the [MIT License](https://github.com/eXon/videojs-vimeo/blob/master/LICENSE)
- [videojs-hotkeys](https://github.com/ctd1500/videojs-hotkeys) published under the [Apache License 2.0](https://github.com/ctd1500/videojs-hotkeys/blob/master/LICENSE.md)
- [Emitter](https://github.com/component/emitter) published under the [MIT License](https://github.com/component/emitter/blob/master/LICENSE)
- The font [Open Sans](https://www.google.com/fonts/specimen/Open+Sans) published under the [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
Our resolution switching component is based on [videojs-resolutions](https://github.com/vidcaster/video-js-resolutions) published under the [Apache License 2.0](https://github.com/vidcaster/video-js-resolutions/blob/master/LICENSE.txt).
Thanks for your great work, guys!
## Copyright and License
Copyright moay under the [MIT license](LICENSE.md).
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
<html>
<head>
<style>
@import url('https://fonts.googleapis.com/css?family=Roboto:700');
body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
font-weight: 700;
font-family: "Roboto";
}
svg {
width: 30vw;
height: auto;
}
.help-links {
margin-top: 1rem;
}
.help-link {
font-size: 18px;
color: rgb(0, 184, 212);
text-decoration: none;
}
</style>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 462 462">
<g fill="none" fill-rule="evenodd">
<path fill="#00B8D4" d="M0 0h462v462H0z"/>
<path fill="#FFF" d="M33.484 299v-25.74h9.792c7.056 0 10.332 3.132 10.332 8.604v.144c0 5.4-3.636 8.316-10.008 8.316h-2.772V299h-7.344zm7.344-13.716h2.124c2.376 0 3.636-1.116 3.636-3.24v-.144c0-2.196-1.296-3.096-3.6-3.096h-2.16v6.48zM56.956 299h17.136v-5.724h-9.72V273.26h-7.416V299zm18.864 0l8.244-25.74h9.54l8.172 25.74h-7.812l-1.368-4.788h-8.532L82.696 299H75.82zm12.528-19.764l-2.844 9.9h5.652l-2.808-9.9zM107.86 299v-11.016l-8.388-14.724h8.028l4.356 8.676 4.356-8.676h7.056l-7.992 14.724V299h-7.416zm18.18 0h18.36v-5.688h-11.016v-4.68h8.316v-5.256h-8.316v-4.428h10.44v-5.688H126.04V299zm22.032 0v-25.74h10.08c6.732 0 10.476 2.736 10.476 8.172v.144c0 3.672-1.944 5.724-4.644 6.768L170.14 299h-7.776l-5.22-9.216h-1.728V299h-7.344zm7.344-14.004h2.376c2.484 0 3.708-1.044 3.708-3.132v-.144c0-2.088-1.296-2.916-3.672-2.916h-2.412v6.192zm-67.154-63.85c6.072 0 7.994 5.26 7.994 11.84v25.5h15.28V230.25c0-12.648-6.173-23.172-21.25-23.172-7.79 0-13.256 3.238-16.19 6.173-3.542-3.842-8.4-6.17-14.37-6.17-4.25 0-8.6 1.518-11.534 3.845v-3.035h-15.28v50.593h15.28v-33.29c2.023-2.53 5.06-4.05 8.398-4.05 6.072 0 7.994 5.263 7.994 11.84v25.5h15.28V230.25c0-1.62-.203-3.136-.405-4.654 2.02-2.732 5.36-4.453 8.8-4.453zm58.386 24.184c5.363 0 8.804-2.63 10.828-6.375l12.142 8.196c-4.654 7.29-12.85 12.147-22.868 12.147-13.357 0-25.804-10.524-25.804-26.107 0-14.876 10.524-26.108 26.107-26.108 12.85 0 24.387 8.4 24.387 24.388 0 1.416-.1 2.934-.304 4.452H135.62c.707 6.78 6.475 9.41 11.028 9.41zm-.506-26.006c-3.642 0-9.005 1.62-10.422 7.69h20.643c-.81-5.363-5.262-7.69-10.22-7.69zm32.18 13.863c0-13.863 9.51-26.107 24.486-26.107 4.15 0 8.197 1.417 11.13 3.845V186.64h15.28v71.844h-15.28v-2.934c-2.933 2.428-6.98 3.744-11.13 3.744-14.976 0-24.487-12.244-24.487-26.107zm27.016 12.143c3.744 0 6.476-1.417 8.6-4.15v-15.886c-2.124-2.732-4.856-4.25-8.6-4.25-7.286 0-11.637 5.464-11.637 12.143 0 6.678 4.355 12.143 11.64 12.143zm35.416 13.154h15.38V207.89h-15.38v50.594zm0-56.92h15.38V186.69h-15.38v14.876zm114.158-.05h15.38V186.64h-15.38v14.875zm-89.164 31.673c0-13.863 9.512-26.107 24.488-26.107 4.148 0 8.196 1.417 11.13 3.845v-3.035h15.28v50.594h-15.28v-2.934c-2.934 2.428-6.982 3.744-11.13 3.744-14.976 0-24.488-12.244-24.488-26.107zm27.017 12.143c3.744 0 6.476-1.417 8.6-4.15v-15.886c-2.124-2.732-4.856-4.25-8.6-4.25-7.285 0-11.636 5.464-11.636 12.143 0 6.678 4.35 12.143 11.632 12.143zm33.415 39.31h20v-120h-20v120zm28.732-26.406h15.38V207.64h-15.38v50.594zm76-25.047c0 13.863-9.512 26.107-24.488 26.107-4.148 0-8.196-1.316-11.13-3.744v2.934h-15.28V186.64h15.28v24.285c2.934-2.428 6.982-3.845 11.13-3.845 14.976 0 24.488 12.244 24.488 26.107zm-25.017 12.143c7.285 0 11.636-5.465 11.636-12.143 0-6.68-4.35-12.143-11.632-12.143-3.744 0-6.578 1.518-8.602 4.25v15.887c2.024 2.736 4.858 4.15 8.602 4.15z"/>
</g>
</svg>
<div class="help-links">
You search something, but this page is not found or has been moved.
</div>
</body>
</html>
<html>
<head>
<style>
@import url('https://fonts.googleapis.com/css?family=Roboto:700');
body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
font-weight: 700;
font-family: "Roboto";
}
svg {
width: 30vw;
height: auto;
}
.help-links {
margin-top: 1rem;
text-align: center;
}
.help-link {
font-size: 18px;
color: rgb(0, 184, 212);
text-decoration: none;
}
</style>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 462 462">
<g fill="none" fill-rule="evenodd">
<path fill="#D0021B" d="M0 0h462v462H0z"/>
<path fill="#FFF" d="M33.484 299v-25.74h9.792c7.056 0 10.332 3.132 10.332 8.604v.144c0 5.4-3.636 8.316-10.008 8.316h-2.772V299h-7.344zm7.344-13.716h2.124c2.376 0 3.636-1.116 3.636-3.24v-.144c0-2.196-1.296-3.096-3.6-3.096h-2.16v6.48zM56.956 299h17.136v-5.724h-9.72V273.26h-7.416V299zm18.864 0l8.244-25.74h9.54l8.172 25.74h-7.812l-1.368-4.788h-8.532L82.696 299H75.82zm12.528-19.764l-2.844 9.9h5.652l-2.808-9.9zM107.86 299v-11.016l-8.388-14.724h8.028l4.356 8.676 4.356-8.676h7.056l-7.992 14.724V299h-7.416zm18.18 0h18.36v-5.688h-11.016v-4.68h8.316v-5.256h-8.316v-4.428h10.44v-5.688H126.04V299zm22.032 0v-25.74h10.08c6.732 0 10.476 2.736 10.476 8.172v.144c0 3.672-1.944 5.724-4.644 6.768L170.14 299h-7.776l-5.22-9.216h-1.728V299h-7.344zm7.344-14.004h2.376c2.484 0 3.708-1.044 3.708-3.132v-.144c0-2.088-1.296-2.916-3.672-2.916h-2.412v6.192zm-67.154-63.85c6.072 0 7.994 5.26 7.994 11.84v25.5h15.28V230.25c0-12.648-6.173-23.172-21.25-23.172-7.79 0-13.256 3.238-16.19 6.173-3.542-3.842-8.4-6.17-14.37-6.17-4.25 0-8.6 1.518-11.534 3.845v-3.035h-15.28v50.593h15.28v-33.29c2.023-2.53 5.06-4.05 8.398-4.05 6.072 0 7.994 5.263 7.994 11.84v25.5h15.28V230.25c0-1.62-.203-3.136-.405-4.654 2.02-2.732 5.36-4.453 8.8-4.453zm58.386 24.184c5.363 0 8.804-2.63 10.828-6.375l12.142 8.196c-4.654 7.29-12.85 12.147-22.868 12.147-13.357 0-25.804-10.524-25.804-26.107 0-14.876 10.524-26.108 26.107-26.108 12.85 0 24.387 8.4 24.387 24.388 0 1.416-.1 2.934-.304 4.452H135.62c.707 6.78 6.475 9.41 11.028 9.41zm-.506-26.006c-3.642 0-9.005 1.62-10.422 7.69h20.643c-.81-5.363-5.262-7.69-10.22-7.69zm32.18 13.863c0-13.863 9.51-26.107 24.486-26.107 4.15 0 8.197 1.417 11.13 3.845V186.64h15.28v71.844h-15.28v-2.934c-2.933 2.428-6.98 3.744-11.13 3.744-14.976 0-24.487-12.244-24.487-26.107zm27.016 12.143c3.744 0 6.476-1.417 8.6-4.15v-15.886c-2.124-2.732-4.856-4.25-8.6-4.25-7.286 0-11.637 5.464-11.637 12.143 0 6.678 4.355 12.143 11.64 12.143zm35.416 13.154h15.38V207.89h-15.38v50.594zm0-56.92h15.38V186.69h-15.38v14.876zm114.158-.05h15.38V186.64h-15.38v14.875zm-89.164 31.673c0-13.863 9.512-26.107 24.488-26.107 4.148 0 8.196 1.417 11.13 3.845v-3.035h15.28v50.594h-15.28v-2.934c-2.934 2.428-6.982 3.744-11.13 3.744-14.976 0-24.488-12.244-24.488-26.107zm27.017 12.143c3.744 0 6.476-1.417 8.6-4.15v-15.886c-2.124-2.732-4.856-4.25-8.6-4.25-7.285 0-11.636 5.464-11.636 12.143 0 6.678 4.35 12.143 11.632 12.143zm33.415 39.31h20v-120h-20v120zm28.732-26.406h15.38V207.64h-15.38v50.594zm76-25.047c0 13.863-9.512 26.107-24.488 26.107-4.148 0-8.196-1.316-11.13-3.744v2.934h-15.28V186.64h15.28v24.285c2.934-2.428 6.982-3.845 11.13-3.845 14.976 0 24.488 12.244 24.488 26.107zm-25.017 12.143c7.285 0 11.636-5.465 11.636-12.143 0-6.68-4.35-12.143-11.632-12.143-3.744 0-6.578 1.518-8.602 4.25v15.887c2.024 2.736 4.858 4.15 8.602 4.15z"/>
</g>
</svg>
<div class="help-links">
Oups, something wrong appens ...<br>We are sorry, and working hard to improve your experience
</div>
</body>
</html>
<html>
<head>
<style>
@import url('https://fonts.googleapis.com/css?family=Roboto:700');
body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
font-weight: 700;
font-family: "Roboto";
}
svg {
width: 30vw;
height: auto;
}
.help-links {
margin-top: 1rem;
}
.help-link {
font-size: 18px;
color: rgb(0, 184, 212);
text-decoration: none;
}
</style>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 462 462">
<g fill="none" fill-rule="evenodd">
<path fill="#00B8D4" d="M0 0h462v462H0z"/>
<path fill="#FFF" d="M33.484 299v-25.74h9.792c7.056 0 10.332 3.132 10.332 8.604v.144c0 5.4-3.636 8.316-10.008 8.316h-2.772V299h-7.344zm7.344-13.716h2.124c2.376 0 3.636-1.116 3.636-3.24v-.144c0-2.196-1.296-3.096-3.6-3.096h-2.16v6.48zM56.956 299h17.136v-5.724h-9.72V273.26h-7.416V299zm18.864 0l8.244-25.74h9.54l8.172 25.74h-7.812l-1.368-4.788h-8.532L82.696 299H75.82zm12.528-19.764l-2.844 9.9h5.652l-2.808-9.9zM107.86 299v-11.016l-8.388-14.724h8.028l4.356 8.676 4.356-8.676h7.056l-7.992 14.724V299h-7.416zm18.18 0h18.36v-5.688h-11.016v-4.68h8.316v-5.256h-8.316v-4.428h10.44v-5.688H126.04V299zm22.032 0v-25.74h10.08c6.732 0 10.476 2.736 10.476 8.172v.144c0 3.672-1.944 5.724-4.644 6.768L170.14 299h-7.776l-5.22-9.216h-1.728V299h-7.344zm7.344-14.004h2.376c2.484 0 3.708-1.044 3.708-3.132v-.144c0-2.088-1.296-2.916-3.672-2.916h-2.412v6.192zm-67.154-63.85c6.072 0 7.994 5.26 7.994 11.84v25.5h15.28V230.25c0-12.648-6.173-23.172-21.25-23.172-7.79 0-13.256 3.238-16.19 6.173-3.542-3.842-8.4-6.17-14.37-6.17-4.25 0-8.6 1.518-11.534 3.845v-3.035h-15.28v50.593h15.28v-33.29c2.023-2.53 5.06-4.05 8.398-4.05 6.072 0 7.994 5.263 7.994 11.84v25.5h15.28V230.25c0-1.62-.203-3.136-.405-4.654 2.02-2.732 5.36-4.453 8.8-4.453zm58.386 24.184c5.363 0 8.804-2.63 10.828-6.375l12.142 8.196c-4.654 7.29-12.85 12.147-22.868 12.147-13.357 0-25.804-10.524-25.804-26.107 0-14.876 10.524-26.108 26.107-26.108 12.85 0 24.387 8.4 24.387 24.388 0 1.416-.1 2.934-.304 4.452H135.62c.707 6.78 6.475 9.41 11.028 9.41zm-.506-26.006c-3.642 0-9.005 1.62-10.422 7.69h20.643c-.81-5.363-5.262-7.69-10.22-7.69zm32.18 13.863c0-13.863 9.51-26.107 24.486-26.107 4.15 0 8.197 1.417 11.13 3.845V186.64h15.28v71.844h-15.28v-2.934c-2.933 2.428-6.98 3.744-11.13 3.744-14.976 0-24.487-12.244-24.487-26.107zm27.016 12.143c3.744 0 6.476-1.417 8.6-4.15v-15.886c-2.124-2.732-4.856-4.25-8.6-4.25-7.286 0-11.637 5.464-11.637 12.143 0 6.678 4.355 12.143 11.64 12.143zm35.416 13.154h15.38V207.89h-15.38v50.594zm0-56.92h15.38V186.69h-15.38v14.876zm114.158-.05h15.38V186.64h-15.38v14.875zm-89.164 31.673c0-13.863 9.512-26.107 24.488-26.107 4.148 0 8.196 1.417 11.13 3.845v-3.035h15.28v50.594h-15.28v-2.934c-2.934 2.428-6.982 3.744-11.13 3.744-14.976 0-24.488-12.244-24.488-26.107zm27.017 12.143c3.744 0 6.476-1.417 8.6-4.15v-15.886c-2.124-2.732-4.856-4.25-8.6-4.25-7.285 0-11.636 5.464-11.636 12.143 0 6.678 4.35 12.143 11.632 12.143zm33.415 39.31h20v-120h-20v120zm28.732-26.406h15.38V207.64h-15.38v50.594zm76-25.047c0 13.863-9.512 26.107-24.488 26.107-4.148 0-8.196-1.316-11.13-3.744v2.934h-15.28V186.64h15.28v24.285c2.934-2.428 6.982-3.845 11.13-3.845 14.976 0 24.488 12.244 24.488 26.107zm-25.017 12.143c7.285 0 11.636-5.465 11.636-12.143 0-6.68-4.35-12.143-11.632-12.143-3.744 0-6.578 1.518-8.602 4.25v15.887c2.024 2.736 4.858 4.15 8.602 4.15z"/>
</g>
</svg>
</body>
</html>
server {
listen 80 default_server;
server_name _;
location / {
root /data;
index index.html;
gzip_static on;
brotli_static on;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /data;
}
}
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
gzip off;
brotli off;
include /etc/nginx/conf.d/*.conf;
}
'use strict';
require('babel/register');
const plugins = require('gulp-load-plugins')();
const gulp = require('gulp');
const del = require('del');
const fs = require('fs');
const gzip = require('gulp-gzip');
const brotli = require('gulp-brotli');
const browserify = require('browserify');
const babelify = require("babelify");
const notifierReporter = require('mocha-notifier-reporter');
const getPackageJson = function () {
return JSON.parse(fs.readFileSync('./package.json', 'utf8'));
};
// Shortcut to the build task
gulp.task('build', ['cleanup-tmp'], function(){
gulp.src('./dist/*.js')
.pipe(gzip())
.pipe(gulp.dest('./dist'));
gulp.src('./dist/*.js')
.pipe(brotli.compress())
.pipe(gulp.dest('./dist'));
});
// General build task, cleans up after real build
gulp.task('cleanup-tmp',['build-player'], function(){
return del(['./dist/tmp']);
});
// Helper task for building the release
gulp.task('build-player', ['compile'], function(){
const build = (target, includes) => {
const pkg = getPackageJson();
const banner = ['/**',
' * <%= pkg.name %> - <%= pkg.description %>',
' * @link <%= pkg.homepage %>',
' * @version <%= pkg.version %>',
' * @license <%= pkg.license %>',
' * ',
' * <%= pkg.name %> includes some scripts provided under different licenses by their authors. Please see the project sources via <%= pkg.homepage %> in order to learn which projects are included and how you may use them.',
' */',
''].join('\n');
// Loading LESS files
return gulp.src([
"./src/less/skins/*.less",
"./src/less/components/*.less"
])
// Convert LESS files to CSS
.pipe(plugins.less())
// Add normal css which doesn't need to be compiled
.pipe(plugins.addSrc.prepend('./vendor/videojs/video-js.css'))
// Minify the CSS
.pipe(plugins.cssmin())
// Now convert it to JavaScript and specify options
.pipe(plugins.css2js({
splitOnNewline: false
}))
// Add all the javascript files in the correct order
.pipe(plugins.addSrc.append([
'./vendor/videojs/video.js',
]))
.pipe(plugins.addSrc.append(includes))
.pipe(plugins.addSrc.append([
'./dist/tmp/player-bundle.js'
]))
// Concatenate into a single large file
.pipe(plugins.concat(target))
// Minify the JavaScript
.pipe(plugins.uglify().on('error', plugins.util.log))
.pipe(plugins.header(banner, {pkg: pkg}))
.pipe(gulp.dest("./dist/"));
};
build("player.full.min.js", [
'./vendor/videojs/plugins/videojs-hotkeys.js',
'./vendor/videojs/plugins/videojs-youtube.js',
'./vendor/videojs/plugins/videojs-vimeo.js',
'./vendor/videojs/plugins/videojs-hls.js'
]);
build("player.hls.min.js", [
'./vendor/videojs/plugins/videojs-hotkeys.js',
'./vendor/videojs/plugins/videojs-hls.js'
]);
build("player.basic.min.js", [
'./vendor/videojs/plugins/videojs-hotkeys.js'
]);
build("player.social.min.js", [
'./vendor/videojs/plugins/videojs-hotkeys.js',
'./vendor/videojs/plugins/videojs-youtube.js',
'./vendor/videojs/plugins/videojs-vimeo.js',
]);
});
// Task to compile ES6 components
gulp.task('compile',['compileComponents'], function(){
// Create empty file
gulp.src(__dirname+'/dist/tmp/components/*.js')
.pipe(plugins.concat("player-bundle.js"))
.pipe(gulp.dest(__dirname+"/dist/tmp/"));
// Compile
const extensions = ['.js', '.json', '.es6'];
return browserify({ debug: true, extensions:extensions })
.transform(babelify.configure({
extensions: extensions
}))
.require(__dirname+"/src/js/init.js", { entry: true })
.bundle()
.on("error", function (err) { console.log("Error : " + err.message); })
.pipe(fs.createWriteStream(__dirname+"/dist/tmp/player-bundle.js",{flags: 'a'}));
});
gulp.task('compileComponents', function(){
// Compile VIDEO.js components
return gulp.src('./src/js/vjs-components/*.js')
.pipe(plugins.babel())
.pipe(gulp.dest(__dirname+'/dist/tmp/components'));
});
// Patch version bump
gulp.task('bump', function(){
return gulp.src('.')
.pipe(plugins.prompt.prompt({
type: 'list',
name: 'bump',
message: 'What type of bump would you like to do?',
choices: ['cancel','patch', 'minor', 'major']
}, function(res){
if(res.bump === 'cancel'){
plugins.util.log(plugins.util.colors.red('Version bump canceled.'));
}
else{
gulp.src('./package.json')
.pipe(plugins.bump({type:res.bump}))
.pipe(gulp.dest('./'));
}
}));
});
gulp.task('test', function(){
return gulp.src('./test/*.js')
.pipe(plugins.mocha({
reporter: notifierReporter.decorate('spec')
}));
});
{
"name": "medialib-player",
"description": "Official medialib.tv video player",
"version": "1.0.4",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/medialib/player.git"
},
"jsdelivr": "dist/player.min.js",
"homepage": "http://playerplayer.com",
"devDependencies": {
"append-stream": "^1.2.2",
"babel": "^5.8.23",
"babelify": "^6.3.0",
"browserify": "^11.1.0",
"chai": "^3.2.0",
"coveralls": "^2.11.4",
"del": "^1.2.1",
"gulp": "^3.9.1",
"gulp-add-src": "~0.2.0",
"gulp-babel": "^5.2.1",
"gulp-brotli": "^1.2.1",
"gulp-bump": "^0.3.1",
"gulp-concat": "*",
"gulp-coverage": "^0.3.36",
"gulp-css2js": "*",
"gulp-cssmin": "*",
"gulp-file": "^0.2.0",
"gulp-filter": "~3.0.1",
"gulp-git": "~1.2.4",
"gulp-github-release": "^1.0.3",
"gulp-gzip": "^1.4.0",
"gulp-header": "~1.5.0",
"gulp-istanbul": "^0.10.1",
"gulp-less": "*",
"gulp-load-plugins": "~1.0.0-rc.1",
"gulp-mocha": "^2.1.3",
"gulp-prompt": "^0.1.2",
"gulp-uglify": "^1.3.0",
"gulp-util": "^3.0.6",
"gulp-zip": "~3.0.2",
"isparta": "^3.0.4",
"istanbul": "^0.3.21",
"istanbul-traceur": "^1.0.7",
"jquery": "^2.1.4",
"jsdom": "^6.5.0",
"karma": "^0.13.10",
"mocha": "^2.3.2",
"mocha-jsdom": "^1.0.0",
"mocha-notifier-reporter": "^0.1.1",
"mockery": "^1.4.0",
"sinon": "^1.16.1",
"sinon-chai": "^2.8.0",
"traceur": "0.0.91"
},
"scripts": {
"test": "babel-node ./node_modules/.bin/isparta cover _mocha -- --reporter dot && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage",
"coverage": "babel-node ./node_modules/.bin/isparta cover --report text --report html _mocha -- --reporter dot"
}
}
<!DOCTYPE html>
<html>
<head>
<title>medialib.tv player development sandbox</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.3">
<!-- STYLES -->
<link rel="stylesheet" type="text/css" href="../vendor/videojs/video-js.css">
<link rel="stylesheet/less" type="text/css" href="../src/less/skins/player-default.less">
<link rel="stylesheet/less" type="text/css" href="../src/less/skins/player-light.less">
<link rel="stylesheet/less" type="text/css" href="../src/less/skins/player-dark.less">
<link rel="stylesheet/less" type="text/css" href="../src/less/components/lightbox.less">
<!-- SCRIPTS -->
<script src="js/less.min.js" type="text/javascript"></script>
<script type="text/javascript" src="../vendor/videojs/video.js"></script>
<script type="text/javascript" src="../vendor/videojs/plugins/videojs-youtube.js"></script>
<script type="text/javascript" src="../vendor/videojs/plugins/videojs-vimeo.js"></script>
<script type="text/javascript" src="../vendor/videojs/plugins/videojs-hotkeys.js"></script>
<script type="text/javascript" src="../vendor/videojs/plugins/videojs-hls.js"></script>
<script type="text/javascript" src="../dist/tmp/player-bundle.js"></script>
<style>
body{
max-width:1000px;
margin: 0 auto;
padding:0 50px 50px;
}
</style>
</head>
<body>
<h1>This is just a sandbox for development.</h1>
<!-- YOUTUBE TEST -->