Skip to content

Instantly share code, notes, and snippets.

View avrum's full-sized avatar

Aviram Fireberger avrum

View GitHub Profile
@avrum
avrum / Camera2VideoFragment.java
Created July 16, 2020 08:10
Producing video chunks for Android using MediaRecorder
package com.example.android.mediarecorder;
/*
* Copyright 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@avrum
avrum / RepeatingBG.cs
Created June 8, 2020 20:09
A custom repeating background for Unity - made by Aviram Fireberger
using UnityEngine;
public class RepeatingBG : MonoBehaviour
{
public float speed;
public int numberOrRepeatedParts = 2;
public Mode mode = Mode.FillScreenKeepRatio_AlignTop;
private Player player;
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],