GithubHelp home page GithubHelp logo

chengjingfeng / viewer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nextcloud/viewer

0.0 2.0 0.0 41.96 MB

๐Ÿ–ผ Simple file viewer with slideshow for media

License: GNU Affero General Public License v3.0

JavaScript 75.58% Makefile 0.82% PHP 0.97% Shell 0.42% Vue 22.20%

viewer's Introduction

Files viewer for nextcloud

Show your latest holiday photos and videos like in the movies. Show a glimpse of your latest novel directly from your nextcloud. Choose the best GIF of your collection thanks to the direct view of your favorites files!

viewer

๐Ÿ“‹ Current support

  • Images
  • Videos

๐Ÿ— Development setup

  1. โ˜ Clone this app into the apps folder of your Nextcloud: git clone https://github.com/nextcloud/viewer.git
  2. ๐Ÿ‘ฉโ€๐Ÿ’ป In the folder of the app, run the command make to install dependencies and build the Javascript.
  3. โœ… Enable the app through the app management of your Nextcloud
  4. ๐ŸŽ‰ Partytime!

๐Ÿง™ Advanced development stuff

To build the Javascript whenever you make changes, instead of the full make you can also run make build-js.

๐Ÿ” Add you own file view

If you want to make your app compatible with this app, you can use the OCA.Viewer methods

  1. Create a vue component which use the path and mime props (they will be automatically passed by the viewer)
  2. Register your mime viewer with the following:
     import VideoView from 'VideoView.vue'
    
     OCA.Viewer.registerHandler({
         // unique id
         id: 'video',
    
        // optional, it will group every view of this group and
        // use the proper view when building the file list
        // of the slideshow.
        // e.g. you open an image/jpeg that have the `media` group
        // you will be able to see the video/mpeg from the `video` handler
        // files that also have the `media` group set.
        group: 'media',
    
        // the list of mimes your component is able to display
        mimes: [
             'video/mpeg',
             'video/ogg',
             'video/webm',
             'video/mp4'
         ],
    
         // your vue component view
         component: VideoView
     })
  3. if you feel like your mime should be integrated on this repo, you can also create a pull request with your object on the models directory and the view on the components directory. Please have a look at what's already here and take example of it. ๐Ÿ™‡โ€โ™€๏ธ

viewer's People

Contributors

dependabot-support avatar dependabot[bot] avatar jancborchardt avatar mariusbluem avatar morrisjobke avatar nextcloud-bot avatar nickvergessen avatar rullzer avatar skjnldsv avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.